I have been trying to add authenticated proxies to my selenium code. I came across selenium wire after alot of research. When I ran the can it threw me this error?
selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_TUNNEL_CONNECTION_FAILED
(Session info: headless chrome=102.0.5005.115)
import seleniumwire
from seleniumwire import webdriver
import time
options = {
'proxy': {
'https': 'https://proxy.proxyverse.io:443',
'http': 'http://proxy.proxyverse.io:443',
}
}
# other chrome options
op = webdriver.ChromeOptions()
op.add_argument("window-size=1920,1080")
op.add_experimental_option("excludeSwitches", ["enable-automation"])
op.add_argument("--headless")
op.add_experimental_option('useAutomationExtension', False)
op.add_argument("start-maximized")
driver = webdriver.Chrome("path/chromedriver.exe" ,options=op,seleniumwire_options=options)
driver.get("https://google.com/")
I need to know what is causing this because without proxies the driver is working fine. Thanks