log输出修改
This commit is contained in:
parent
70698f16bf
commit
08a5e53233
2
main.py
2
main.py
@ -82,5 +82,5 @@ if __name__ == "__main__":
|
||||
try:
|
||||
main()
|
||||
except cookieError:
|
||||
print("账号Cookie有问题!")
|
||||
tools.log.error("账号Cookie有问题!")
|
||||
pass
|
||||
|
@ -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__":
|
||||
|
@ -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')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user