Update login.py

This commit is contained in:
zhao-zg 2024-07-30 11:45:51 +08:00 committed by GitHub
parent 8880dc5a0e
commit cd7aa93653
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -164,9 +164,9 @@ async def loginPhone(chromium_path, workList, uid, headless):
workList[uid].msg = "账号异常,自行检查"
break
if False == sms_sent:
button = await page.querySelector('.getMsg-btn.text-btn')
button = await page.querySelector('.getMsg-btn.text-btn.timer.active')
print(button.evaluate("textContent"))
if "获取验证码" not in button.evaluate("textContent"):
if button and "获取验证码" not in button.evaluate("textContent"):
print("进入直接发短信分支")
if not workList[uid].isAuto:
workList[uid].status = "SMS"
@ -197,7 +197,6 @@ async def loginPhone(chromium_path, workList, uid, headless):
await asyncio.sleep(1)
except Exception as e:
continue
print("异常退出")
print(e)
await browser.close()