log输出修改

This commit is contained in:
Womsxd 2022-01-06 11:31:24 +08:00
parent 70698f16bf
commit 08a5e53233
No known key found for this signature in database
GPG Key ID: 0FE76418EE689B68
3 changed files with 4 additions and 4 deletions

View File

@ -82,5 +82,5 @@ if __name__ == "__main__":
try:
main()
except cookieError:
print("账号Cookie有问题")
tools.log.error("账号Cookie有问题")
pass

View File

@ -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__":

View File

@ -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')