Skip to content

Cloudflare bypass with uc, cdp and headless #3734

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
breadacker opened this issue May 9, 2025 · 1 comment
Closed

Cloudflare bypass with uc, cdp and headless #3734

breadacker opened this issue May 9, 2025 · 1 comment
Labels
question Someone is looking for answers UC Mode / CDP Mode Undetected Chromedriver Mode / CDP Mode

Comments

@breadacker
Copy link

with SB(uc=True, headless2=True, test=True, maximize=True, incognito=True, do_not_track=True, ad_block=True) as sb: # Open the main page once sb.activate_cdp_mode(url)

Does this code bypass all kinds of CF verifications with uc, cdp and headless enabled? Also what does uc_cdp stand for in SB context?

@mdmintz mdmintz added question Someone is looking for answers UC Mode / CDP Mode Undetected Chromedriver Mode / CDP Mode labels May 9, 2025
@mdmintz
Copy link
Member

mdmintz commented May 9, 2025

Headless mode is detectable, so if you need to run on a GUI-less display, such as on Linux, there's the xvfb option.

Also note that some features use extensions (such as the ad-blocker and auth proxy), so if you need to use any of those, then you can't use incognito mode (because you can't run extensions in incognito mode).

uc_cdp_events / uc_cdp is a separate option for capturing CDP events in UC Mode.
Example of that: SeleniumBase/examples/uc_cdp_events.py.

CDP Mode has more advanced ways of capturing requests / responses / XHR:

There are lots of examples in SeleniumBase/examples/cdp_mode for helping you get started.

@mdmintz mdmintz closed this as completed May 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Someone is looking for answers UC Mode / CDP Mode Undetected Chromedriver Mode / CDP Mode
Projects
None yet
Development

No branches or pull requests

2 participants