mirror of
https://github.com/EstrellaXD/Auto_Bangumi.git
synced 2026-05-05 00:15:01 +08:00
- 区分 Consts 和 Settings,取代 Env - 独立 downloader module,为便于后续提供多下载器支持 - 加入命令行选项,提供 debug 模式 - 其他细节
13 lines
283 B
Python
13 lines
283 B
Python
import json
|
|
|
|
|
|
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="utf8") as f:
|
|
json.dump(obj, f, indent=4, separators=(",", ": "), ensure_ascii=False)
|
|
pass
|