chore: move Auto_Bangumi/src -> Auto_Bangumi/backend/src, prepare for merge WebUI repo

This commit is contained in:
zthxxx
2023-06-06 22:33:00 +08:00
parent f8411f9c8a
commit 069a86faa0
99 changed files with 179 additions and 0 deletions

View File

@@ -0,0 +1 @@

View File

@@ -0,0 +1,5 @@
import logging
from .json_config import load, save
logger = logging.getLogger(__name__)

View File

@@ -0,0 +1,19 @@
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()