登录验证码等待时间延长

This commit is contained in:
work
2025-05-21 18:06:12 +08:00
parent 836c18d47a
commit f8ee4a1bc9

View File

@@ -1207,7 +1207,7 @@ def playwright_login(username, password, code_2fa=None):
page.locator('//img[contains(@src, "captcha")]/parent::div/parent::div/div').nth(4).click() page.locator('//img[contains(@src, "captcha")]/parent::div/parent::div/div').nth(4).click()
else: else:
raise OperationFailed('验证码解析错误') raise OperationFailed('验证码解析错误')
time.sleep(5) time.sleep(8)
page.wait_for_load_state() page.wait_for_load_state()
h2 = page.query_selector("//h2/span") h2 = page.query_selector("//h2/span")
if h2 is None: if h2 is None: