Womsxd / MihoyoBBSTools

Womsxd/AutoMihoyoBBS,米游社相关脚本
MIT License
874 stars 152 forks source link

本地部署使用python main_multi.py autorun运行报错 #157

Closed Clulu1499 closed 5 months ago

Clulu1499 commented 5 months ago

大佬——现在每日首次自动签到会出现以下报错 2024-06-12T00:14:28 INFO 正在为开拓者****进行签到... Traceback (most recent call last): File "F:\MihoyoBBSTools-master\main_multi.py", line 96, in main_multi(autorun_flag) File "F:\MihoyoBBSTools-master\main_multi.py", line 62, in main_multi run_code, run_message = main.main() ^^^^^^^^^^^ File "F:\MihoyoBBSTools-master\main.py", line 48, in main return_data += gamecheckin.run_task() ^^^^^^^^^^^^^^^^^^^^^^ File "F:\MihoyoBBSTools-master\gamecheckin.py", line 233, in run_task return_data += checkin_game(game_name, game_module, game_print_name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "F:\MihoyoBBSTools-master\gamecheckin.py", line 218, in checkin_game return_data = f"\n\n{game_module().sign_account()}" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "F:\MihoyoBBSTools-master\gamecheckin.py", line 142, in sign_account req = self.check_in(account) ^^^^^^^^^^^^^^^^^^^^^^ File "F:\MihoyoBBSTools-master\gamecheckin.py", line 108, in check_in validate = captcha.game_captcha(data["data"]["gt"], data["data"]["challenge"]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "F:\MihoyoBBSTools-master\captcha.py", line 14, in game_captcha return rep["data"]["validate"]


KeyError: 'data'

看样子是打码的问题
报错之后重复运行几次就会成功签到,请问有什么办法解决吗
Womsxd commented 5 months ago

captcha.py 打码对接问题,不是本人提供,不提供任何处理,请联系captcha.py提供者 或请直接做异常处理: https://www.runoob.com/python3/python3-errors-execptions.htm

try:
 异常的代码
except:
 return null