Skip to content

Commit ab88595

Browse files
committed
Fix previous commit
1 parent 8c53566 commit ab88595

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

seleniumbase/core/sb_cdp.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1825,8 +1825,8 @@ def _on_a_cf_turnstile_page(self, source=None):
18251825
if (
18261826
(
18271827
'data-callback="onCaptchaSuccess"' in source
1828-
and not 'title="reCAPTCHA"' in source
1829-
and not 'id="recaptcha-token" in source'
1828+
and 'title="reCAPTCHA"' not in source
1829+
and 'id="recaptcha-token"' not in source
18301830
)
18311831
or "/challenge-platform/scripts/" in source
18321832
or 'id="challenge-widget-' in source
@@ -1837,10 +1837,9 @@ def _on_a_cf_turnstile_page(self, source=None):
18371837
return False
18381838

18391839
def _on_a_g_recaptcha_page(self, source=None):
1840-
if not source or len(source) < 400:
1841-
time.sleep(0.2)
1842-
source = self.get_page_source()
1843-
self.loop.run_until_complete(self.page.wait(0.1))
1840+
time.sleep(0.25)
1841+
self.loop.run_until_complete(self.page.wait(0.25))
1842+
source = self.get_page_source()
18441843
if (
18451844
(
18461845
'id="recaptcha-token"' in source

0 commit comments

Comments
 (0)