From ffc3fc30927824d8d33f7997c1262e6fd54ac388 Mon Sep 17 00:00:00 2001 From: bvwl <2201101122@qq.com> Date: Fri, 21 Nov 2025 00:05:00 +0800 Subject: [PATCH] 0.0.9 --- spider/main.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spider/main.py b/spider/main.py index d534675..80e1f90 100644 --- a/spider/main.py +++ b/spider/main.py @@ -20,7 +20,7 @@ class Auto: def solve_cloudflare(self): tab = self.browser.latest_tab for _ in range(5): - self.tab.wait(0.5) + self.tab.wait(1) try: shadow1 = tab.ele( 'x://*[@name="cf-turnstile-response"]').parent().shadow_root @@ -31,16 +31,16 @@ class Auto: if shadow2: logger.debug("找到Cloudflare iframe body shadow root") status = shadow2.ele( - 'x://span[text()="Verifying..."]', timeout=0.5) + 'x://span[text()="Verifying..."]', timeout=1) if status: tab.wait(3) status = shadow2.ele( - 'x://span[text()="Success!"]', timeout=0.5) + 'x://span[text()="Success!"]', timeout=1) if status: logger.debug("Cloudflare验证成功") return True checkbox = shadow2.ele( - 'x://input[@type="checkbox"]', timeout=0.5) + 'x://input[@type="checkbox"]', timeout=1) if checkbox: checkbox.click() logger.debug("点击Cloudflare复选框")