Skip to content

Bypassing Cloudflare with a VPN #3026

Closed Locked Answered by mdmintz
VolkanBozdogan asked this question in Q&A
Discussion options

You must be logged in to vote

To bypass Cloudflare when using a VPN (such as ExpressVPN), Add sb.uc_gui_click_captcha() after calling sb.uc_open_with_reconnect(url, 8).

The full code from your example would look something like this:

from seleniumbase import SB

with SB(uc=True, ad_block_on=True) as sb:
    url = "URL_WITH_A_CLOUDFLARE_SECURITY_CHECK"
    sb.uc_open_with_reconnect(url, 8)
    sb.uc_gui_click_captcha()

Adjust the reconnect_time, (the 8), as needed. Most sites won't need higher than 4 seconds.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mdmintz
Comment options

Answer selected by mdmintz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants