Files
Auto_Bangumi/module/utils/json_config.py
EstrellaXD f31acc70ff 2.6.0
- refactor
- change config from config.ini to config.json
2023-03-04 20:33:57 +08:00

18 lines
365 B
Python

import json
import requests
def load(filename):
with open(filename, "r", encoding="utf-8") as f:
return json.load(f)
def save(filename, obj):
with open(filename, "w", encoding="utf-8") as f:
json.dump(obj, f, indent=4, separators=(",", ": "), ensure_ascii=False)
pass
def get(url):
req = requests.get(url)
return req.json()