Checklist before reporting
pydoll Version
2.14.0
Python Version
3.12.13
Operating System
Linux
Bug Description
Tab.expect_and_bypass_cloudflare_captcha() (and enable_auto_solve_cloudflare_captcha()) do nothing on Cloudflare's full-page "managed challenge" interstitial (the standalone
"Just a moment… / Verify you are human" page). The context manager returns immediately without attempting a click, and the page stays on the challenge.
The built-in bypass only works for pages that embed
a Turnstile widget (where a .cf-turnstile element exists in the light DOM, e.g. the planetminecraft.com/account/sign_in/
page used in the docs example). On the managed interstitial the widget lives inside Cloudflare's own challenge iframe / closed shadow roo, so the selector-based lookup finds
nothing.
Steps to Reproduce
import asyncio
import pydoll
use expect_and_bypass_cloudflare_captcha(): on link https://www.scrapingcourse.com/cloudflare-challenge
see if it passes
Code Example
import asyncio
from pydoll.browser.chromium import Chrome
# Public test page that always serves Cloudflare's *managed challenge* interstitial
# ("Just a moment..." / "Verify you are human").
URL = "https://www.scrapingcourse.com/cloudflare-challenge"
async def js(tab, expr):
resp = await tab.execute_script(f"(() => ({expr}))()", return_by_value=True)
return resp["result"]["result"]["value"]
async def main():
browser = Chrome() # add ChromiumOptions(binary_location=...) if not system Chrome
tab = await browser.start()
try:
async with tab.expect_and_bypass_cloudflare_captcha():
await tab.go_to(URL)
await asyncio.sleep(3) # let any solve settle
print("title:", await js(tab, "document.title"))
print(
".cf-turnstile in light DOM:",
await js(tab, "document.querySelectorAll('.cf-turnstile').length"),
)
finally:
await browser.stop()
asyncio.run(main())
Expected Behavior
I would expect cloudflare to be clicked and autosolved
Actual Behavior
It stays on the cloudflare page without attempting to solve it
Relevant Log Output
Additional Context
No response
Checklist before reporting
pydoll Version
2.14.0
Python Version
3.12.13
Operating System
Linux
Bug Description
Tab.expect_and_bypass_cloudflare_captcha()(andenable_auto_solve_cloudflare_captcha()) do nothing on Cloudflare's full-page "managed challenge" interstitial (the standalone"Just a moment… / Verify you are human" page). The context manager returns immediately without attempting a click, and the page stays on the challenge.
The built-in bypass only works for pages that embed
a Turnstile widget (where a
.cf-turnstileelement exists in the light DOM, e.g. theplanetminecraft.com/account/sign_in/page used in the docs example). On the managed interstitial the widget lives inside Cloudflare's own challenge iframe / closed shadow roo, so the selector-based lookup finds
nothing.
Steps to Reproduce
import asyncio
import pydoll
use expect_and_bypass_cloudflare_captcha(): on link https://www.scrapingcourse.com/cloudflare-challenge
see if it passes
Code Example
Expected Behavior
I would expect cloudflare to be clicked and autosolved
Actual Behavior
It stays on the cloudflare page without attempting to solve it
Relevant Log Output
Additional Context
No response