Skip to content

Commit

Permalink
配置文件警告
Browse files Browse the repository at this point in the history
  • Loading branch information
hexadecimal233 committed Apr 5, 2022
1 parent 72f0836 commit 213ea82
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
4 changes: 3 additions & 1 deletion README-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@

## 🚀使用方法

运行 ``python bili-signature.py``
首先**``config.json.template`` 重命名为 ``config.json``.**

然后运行 ``python bili-signature.py``!

## ⚙配置文件

Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions bili-signature.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -71,7 +71,7 @@ def initConfig(self):
fp.close()
return data
except Exception:
print('文件读取失败')
print('配置读取失败,请确保你已将config.json.template重命名为config.json')
exit()

def __init__(self):
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit 213ea82

Please sign in to comment.