mirror of
https://github.com/0-8-4/miui-auto-tasks.git
synced 2024-11-24 09:15:48 +00:00
fix: 第一次人机验证失败后,验证链接无法支持更新 (#180)
* fix: 第一次人机验证失败后,验证链接无法支持更新 * Update utils.py
This commit is contained in:
parent
61f7ca9ae5
commit
2fcff50a6a
@ -216,10 +216,10 @@ async def get_token(uid: str) -> str:
|
|||||||
elif api_data.need_verify:
|
elif api_data.need_verify:
|
||||||
log.error("遇到人机验证码, 尝试调用解决方案")
|
log.error("遇到人机验证码, 尝试调用解决方案")
|
||||||
url = api_data.data.get("url")
|
url = api_data.data.get("url")
|
||||||
for _ in range(3):
|
|
||||||
if toekn := await get_token_by_captcha(url):
|
if toekn := await get_token_by_captcha(url):
|
||||||
return toekn
|
return toekn
|
||||||
return False
|
else:
|
||||||
|
raise ValueError("人机验证失败")
|
||||||
else:
|
else:
|
||||||
log.error("遇到未知错误,无法获取TOKEN")
|
log.error("遇到未知错误,无法获取TOKEN")
|
||||||
return False
|
return False
|
||||||
|
Loading…
Reference in New Issue
Block a user