Just trying to implement the basic code for using a proxy server with selenium. Have tried several free proxies and they all cause google to return “ERR_TUNNEL_CONNECTION_FAILED.” Could be that free proxy servers are not reliable, but I could have also made a mistake in my code below:
import seleniumwire
from seleniumwire import webdriver
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument('--no-sandbox')
chrome_options.add_argument('start-maximized')
sw_options = {
'proxy': {
' https': 'https://162.245.85.220:80'
}
}
driver = webdriver.Chrome(
options=chrome_options,
seleniumwire_options=sw_options,
)
driver.get("https://whatismyipaddress.com/")
`
Any help would be appreciated
Was expecting for selenium to return the IP address of the free proxy server.
James Rowe is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1