mirror of
https://github.com/zhao-zg/jd-login.git
synced 2026-01-16 07:50:43 +08:00
Add files via upload
This commit is contained in:
parent
c04ce1fb05
commit
4abe982835
15
login.py
15
login.py
@ -71,8 +71,8 @@ async def loginPhone(chromium_path, workList, uid, headless):
|
|||||||
# 判断验证码错误
|
# 判断验证码错误
|
||||||
async def isStillInSMSCodeSentPage(page):
|
async def isStillInSMSCodeSentPage(page):
|
||||||
try:
|
try:
|
||||||
button = await page.querySelector('.getMsg-btn.text-btn.timer.active')
|
button = await page.querySelector('.getMsg-btn.text-btn')
|
||||||
if button:
|
if "获取验证码" in button.evaluate("textContent"):
|
||||||
return False
|
return False
|
||||||
return await page.querySelector('#authcode')
|
return await page.querySelector('#authcode')
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
@ -164,8 +164,17 @@ async def loginPhone(chromium_path, workList, uid, headless):
|
|||||||
await verification_shape(page)
|
await verification_shape(page)
|
||||||
await page.waitFor(2000)
|
await page.waitFor(2000)
|
||||||
continue
|
continue
|
||||||
|
elif await page.querySelector('.dialog'):
|
||||||
|
print("进入弹出对话框分支")
|
||||||
|
des = await page.querySelector('.dialog-des').evaluate("textContent")
|
||||||
|
print(des)
|
||||||
|
workList[uid].status = "error"
|
||||||
|
workList[uid].msg = des
|
||||||
|
break
|
||||||
if False == sms_sent:
|
if False == sms_sent:
|
||||||
if await page.querySelector('.getMsg-btn.text-btn'):
|
button = await page.querySelector('.getMsg-btn.text-btn')
|
||||||
|
print(button.evaluate("textContent"))
|
||||||
|
if "获取验证码" 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"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user