Bypassing Cloudflare with a VPN #3026
-
| Hi, I'm using the code below. 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) | 
Beta Was this translation helpful? Give feedback.
      
      
          Answered by
          
            mdmintz
          
      
      
        Aug 15, 2024 
      
    
    Replies: 1 comment 1 reply
-
| To bypass Cloudflare when using a VPN (such as ExpressVPN), Add  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  | 
Beta Was this translation helpful? Give feedback.
                  
                    1 reply
                  
                
            
      Answer selected by
        mdmintz
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
To bypass Cloudflare when using a VPN (such as ExpressVPN), Add
sb.uc_gui_click_captcha()after callingsb.uc_open_with_reconnect(url, 8).The full code from your example would look something like this:
Adjust the
reconnect_time, (the8), as needed. Most sites won't need higher than4seconds.