From e40f9daee3fc5473069e71fd92ac2baaadfef7c2 Mon Sep 17 00:00:00 2001 From: work Date: Thu, 8 May 2025 15:12:02 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BB=B6=E9=95=BF=E7=99=BB=E5=BD=95=E7=AD=89?= =?UTF-8?q?=E5=BE=85=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- spider/task.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spider/task.py b/spider/task.py index 67ed23e..7c369b5 100644 --- a/spider/task.py +++ b/spider/task.py @@ -1163,6 +1163,7 @@ def playwright_login(username, password, code_2fa=None): page.click('//button[@name="login"]') page.wait_for_load_state() + time.sleep(random.randint(3, 10)) # 设置语言为英文 context.add_cookies([ { @@ -1175,7 +1176,9 @@ def playwright_login(username, password, code_2fa=None): "secure": False, }, ]) + time.sleep(random.randint(1, 10)) page.reload() + time.sleep(random.randint(1, 10)) # captcha_img = page.query_selector_all('//img[contains(@src, "captcha")]') # if captcha_img: