Skip to content
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

Can't handle cloudflare turnstile #3616

Closed
playerk17 opened this issue Mar 20, 2025 · 2 comments
Closed

Can't handle cloudflare turnstile #3616

playerk17 opened this issue Mar 20, 2025 · 2 comments
Labels
invalid usage You may need to change what you're doing UC Mode / CDP Mode Undetected Chromedriver Mode / CDP Mode

Comments

@playerk17
Copy link

playerk17 commented Mar 20, 2025

Hello, i can't bypass cloudflare turnstile with click on website: "https://portfolio.jup.ag/portfolio/*"
Here is my code:

from seleniumbase import SB
from selenium.webdriver.common.by import By

user_agents = [
    "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36",
    "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36",
    "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
]
random_user_agent = random.choice(user_agents)

with SB(uc=True, proxy='', incognito=True, agent=random_user_agent) as sb:
    url = "https://portfolio.jup.ag/portfolio/89yMjZXpq37jzSyTYkuHiHNigBgGVETXAQALuXQWC6Xm"
    sb.uc_open_with_reconnect(url, 4)
    sb.uc_gui_click_captcha()

and as result it can't click on turnstile

Image

@mdmintz mdmintz added invalid usage You may need to change what you're doing UC Mode / CDP Mode Undetected Chromedriver Mode / CDP Mode labels Mar 20, 2025
@mdmintz
Copy link
Member

mdmintz commented Mar 20, 2025

Make sure you're using CDP Mode with default settings.

@mdmintz mdmintz closed this as completed Mar 20, 2025
@vyanezz
Copy link

vyanezz commented Mar 21, 2025

Hi, I've been having the same problem for the past 2 days.

Everything was working with sb.uc_gui_click_captcha() on Linux. I tried running my script with the new CDP functions and the captcha was resolved.

However, when interacting with other functions in the same session, such as sb.cdp.click(selector) or sb.cdp.gui_click_element(selector), the cf captcha appears again.

How can I fix this? Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid usage You may need to change what you're doing UC Mode / CDP Mode Undetected Chromedriver Mode / CDP Mode
Projects
None yet
Development

No branches or pull requests

3 participants