mirror of
https://github.com/zhao-zg/jd-login.git
synced 2026-01-12 14:00:43 +08:00
Update login.py
This commit is contained in:
parent
8880dc5a0e
commit
cd7aa93653
5
login.py
5
login.py
@ -164,9 +164,9 @@ async def loginPhone(chromium_path, workList, uid, headless):
|
|||||||
workList[uid].msg = "账号异常,自行检查"
|
workList[uid].msg = "账号异常,自行检查"
|
||||||
break
|
break
|
||||||
if False == sms_sent:
|
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"))
|
print(button.evaluate("textContent"))
|
||||||
if "获取验证码" not in button.evaluate("textContent"):
|
if button and "获取验证码" not in button.evaluate("textContent"):
|
||||||
print("进入直接发短信分支")
|
print("进入直接发短信分支")
|
||||||
if not workList[uid].isAuto:
|
if not workList[uid].isAuto:
|
||||||
workList[uid].status = "SMS"
|
workList[uid].status = "SMS"
|
||||||
@ -197,7 +197,6 @@ async def loginPhone(chromium_path, workList, uid, headless):
|
|||||||
|
|
||||||
await asyncio.sleep(1)
|
await asyncio.sleep(1)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
continue
|
|
||||||
print("异常退出")
|
print("异常退出")
|
||||||
print(e)
|
print(e)
|
||||||
await browser.close()
|
await browser.close()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user