C_f Challenge Fails in Headless Mode – Works in Headed Mode Only #3820
Labels
duplicate
The answer/solution already exists somewhere
invalid usage
You may need to change what you're doing
UC Mode / CDP Mode
Undetected Chromedriver Mode / CDP Mode
I tried using the method
sb.activate_cdp_mode("https://..../")
user_agent = sb.execute_script("return navigator.userAgent;")
sb.sleep(15)
sb.uc_gui_click_captcha()
to solve the Cloudflare challenge "Verify you are human by completing...".
I noticed that in headless mode, it doesn't work, but when using headed=True, everything works fine.
It was also observed that if you use a custom user-agent with headed=True, Cloudflare somehow detects that the browser is under automation control.
What should I do to solve this problem?
user_agent=Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36
sbase version: latest.
I also tried using the method sb.uc_gui_click_cf() with the same result
The text was updated successfully, but these errors were encountered: