diff --git a/main.py b/main.py index f7e84e2..93d2fdf 100644 --- a/main.py +++ b/main.py @@ -82,5 +82,5 @@ if __name__ == "__main__": try: main() except cookieError: - print("账号Cookie有问题!") + tools.log.error("账号Cookie有问题!") pass diff --git a/main_multi.py b/main_multi.py index 28245e0..cc5efb9 100644 --- a/main_multi.py +++ b/main_multi.py @@ -46,7 +46,7 @@ def main_multi(autorun: bool): results["ok"].append(i) tools.log.info(f"{i}执行完毕") time.sleep(random.randint(3, 10)) - print(f'脚本执行完毕,共执行{len(config_List)}个配置文件,成功{len(results["ok"])}个,失败{len(results["error"])}个') + tools.log.info(f'脚本执行完毕,共执行{len(config_List)}个配置文件,成功{len(results["ok"])}个,失败{len(results["error"])}个') if __name__ == "__main__": diff --git a/mihoyobbs.py b/mihoyobbs.py index bf87310..f7feabb 100644 --- a/mihoyobbs.py +++ b/mihoyobbs.py @@ -52,7 +52,7 @@ class mihoyobbs: req = http.get(url=setting.bbs_Taskslist, headers=self.headers) data = req.json() if "err" in data["message"] or data["retcode"] == -100: - tools.log.info("获取任务列表失败,你的cookie可能已过期,请重新设置cookie。") + tools.log.error("获取任务列表失败,你的cookie可能已过期,请重新设置cookie。") config.Clear_cookies() raise cookieError('Cookie expires') else: @@ -120,7 +120,7 @@ class mihoyobbs: tools.log.info(str(i["name"] + data["message"])) time.sleep(random.randint(2, 8)) else: - tools.log.info("签到失败,你的cookie可能已过期,请重新设置cookie。") + tools.log.error("签到失败,你的cookie可能已过期,请重新设置cookie。") config.Clear_cookies() raise cookieError('Cookie expires')