How to use proxies with seleniumbase?

356 Views Asked by At

I am trying to use a proxy with seleniumbase but i get: You are using an unsupported command-line flag: --ignore-certificate-errors. Stability and security will suffer.(at the starting chrome page) (after opening site)Site couldnt be reached whatismyip.com took too long to respond. but the code works fine when i dont have a proxy

from seleniumbase import SB
with SB(uc=True, proxy="IP:PORT") as sb:
    sb.sleep(10)
    sb.driver.get("https://whatismyip.com")
    sb.sleep(10)

And its not that the ip and port are invalid because im checking and making sure they work before using them

import requests
proxies = {"http": "http://IP:PORT"}
response = requests.get("http://ipinfo.io/json", proxies=proxies)
print(response.json())

using this code, could someone help?

edit: maybe ips are different and some work for sb and some dont even if they work for requests and i just need to try with sb until i find working ones? idk

1

There are 1 best solutions below

5
On

The warning about the --ignore-certificate-errors flag is common when using Chrome with Selenium. This usually doesn't prevent the browser from working but indicates that Chrome might not behave as expected.

I checked your Code with my Proxy, and it works totally fine. Try another Proxy