mirror of
https://github.com/zhao-zg/jd-login.git
synced 2026-01-15 15:30:43 +08:00
Update login.py
This commit is contained in:
parent
d487c4fd01
commit
848c1f8abb
8
login.py
8
login.py
@ -118,7 +118,7 @@ async def loginPhone(chromium_path, workList, uid, headless):
|
|||||||
page = await browser.newPage()
|
page = await browser.newPage()
|
||||||
await page.setViewport({"width": 360, "height": 640})
|
await page.setViewport({"width": 360, "height": 640})
|
||||||
await page.goto(
|
await page.goto(
|
||||||
"https://plogin.m.jd.com/login/login?appid=300&returnurl=https%3A%2F%2Fm.jd.com%2F&source=wq_passport"
|
"https://plogin.m.jd.com/login/login"
|
||||||
)
|
)
|
||||||
await typephoneuser(page, usernum)
|
await typephoneuser(page, usernum)
|
||||||
|
|
||||||
@ -141,12 +141,6 @@ async def loginPhone(chromium_path, workList, uid, headless):
|
|||||||
workList[uid].status = "pass"
|
workList[uid].status = "pass"
|
||||||
break
|
break
|
||||||
|
|
||||||
elif await isWrongAccountOrPassword(page):
|
|
||||||
print("进入账号密码不正确分支")
|
|
||||||
|
|
||||||
workList[uid].status = "error"
|
|
||||||
workList[uid].msg = "账号或密码不正确"
|
|
||||||
break
|
|
||||||
elif await page.xpath('//*[@id="captcha_modal"]'):
|
elif await page.xpath('//*[@id="captcha_modal"]'):
|
||||||
print("进入安全验证分支")
|
print("进入安全验证分支")
|
||||||
if await page.xpath('//*[@id="small_img"]'):
|
if await page.xpath('//*[@id="small_img"]'):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user