mirror of
https://github.com/xuthus83/LittlePaimon.git
synced 2024-10-21 16:27:15 +08:00
feat(coin_handle): 米游币自动获取时,签到因验证码失败,则跳过签到继续执行后续任务。
This commit is contained in:
parent
37a1875abc
commit
621d3d9c32
@ -202,11 +202,12 @@ class MihoyoBBSCoin:
|
||||
req = await aiorequests.post(url=bbs_Signurl, json={'gids': i['id']}, headers=header)
|
||||
data = req.json()
|
||||
if data['retcode'] != 0:
|
||||
self.is_valid = False
|
||||
if data['retcode'] not in [1034]:
|
||||
self.is_valid = False
|
||||
self.state = 'Cookie已失效' if data['retcode'] in [-100,
|
||||
10001] else f"出错了:{data['retcode']} {data['message']}"
|
||||
logger.info('米游币自动获取', f'➤➤<r>{self.state}</r>')
|
||||
return self.state
|
||||
return f'讨论区签到:{self.state}'
|
||||
await asyncio.sleep(random.randint(5, 10))
|
||||
logger.info('米游币自动获取', '➤➤讨论区签到<g>完成</g>')
|
||||
return '讨论区签到:完成!'
|
||||
|
Loading…
Reference in New Issue
Block a user