diff --git a/README-zh.md b/README-zh.md index 11f3266..f1f94f6 100644 --- a/README-zh.md +++ b/README-zh.md @@ -14,7 +14,9 @@ ## 🚀使用方法 -运行 ``python bili-signature.py`` +首先**把 ``config.json.template`` 重命名为 ``config.json``.** + +然后运行 ``python bili-signature.py``! ## ⚙配置文件 diff --git a/README.md b/README.md index 67f68e8..9c20b92 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,9 @@ This program changes your Bilibili signature depending on your account fans data ## 🚀Usage -Run ``python bili-signature.py`` +First, **rename ``config.json.template`` to ``config.json``.** + +Then, Run ``python bili-signature.py``! ## ⚙Configuration diff --git a/bili-signature.py b/bili-signature.py index 9f52861..1a9ab5e 100644 --- a/bili-signature.py +++ b/bili-signature.py @@ -62,7 +62,7 @@ def setSignature(self): return requests.post(url=self.setSignatureUrl, params=self.params, headers=self.headers, timeout=10) #配置文件管理 -class config(object): +class Config(object): #初始化配置 def initConfig(self): try: @@ -71,7 +71,7 @@ def initConfig(self): fp.close() return data except Exception: - print('文件读取失败') + print('配置读取失败,请确保你已将config.json.template重命名为config.json') exit() def __init__(self): @@ -154,7 +154,7 @@ def _exit(signum, frame): | {Fore.LIGHTCYAN_EX}本程序可以根据自己的哔哩哔哩账号的粉丝数,自动更改您的个人简介。 {Fore.LIGHTMAGENTA_EX}| ╰──────────────────────────────────────────────────────────────────────╯ V{VERSION}{Style.RESET_ALL}""") - cfg = config().config + cfg = Config().config api = BilibiliApi(cfg['SESSDATA'], cfg['bili_jct']) sign = Signature(cfg) if (cfg['freq'] < 15):