From b1691fd3620a6ec891454416eb22e7575f169e9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=B4=9B?= Date: Sat, 24 Jul 2021 10:33:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=B8=80=E8=A8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bilibili.py | 4 +++- getENV.py | 2 -- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bilibili.py b/bilibili.py index fd88e4e..294d7ed 100644 --- a/bilibili.py +++ b/bilibili.py @@ -330,6 +330,8 @@ class BiliBiliCheckIn(object): if __name__ == "__main__": - datas = json.loads(getENv().read()) + getENv() + with open("/ql/config/check.json", "r", encoding="utf-8") as f: + datas = json.loads(f.read()) _check_item = datas.get("BILIBILI_COOKIE_LIST", [])[0] BiliBiliCheckIn(check_item=_check_item).main() diff --git a/getENV.py b/getENV.py index 6f79e1e..47816ae 100644 --- a/getENV.py +++ b/getENV.py @@ -9,8 +9,6 @@ def getENv(): print('成功 当前环境为青龙面板继续执行') if os.path.exists(config_file): print('已找到配置文件') - with open(config_file, 'r', encoding='utf8') as f: - return f else: print('未找到配置文件\n') print('请添加/ql/config/check.json')