The proxy I'm trying to connect to is ScraperAPI's proxy and this is the way they provided in documentation to connect to seleniumwire, however it doesn't work and it still uses my IP.
API_KEY = 'my_key_here'
proxy_options = {
'proxy': {
'http': f'http://scraperapi:{API_KEY}@proxy-server.scraperapi.com:8001',
'https': f'http://scraperapi:{API_KEY}@proxy-server.scraperapi.com:8001',
'no_proxy': 'localhost,127.0.0.1'
}
}
chrome_options = uc.ChromeOptions()
chrome_options.add_argument('--ignore-ssl-errors=yes')
chrome_options.add_argument('--ignore-certificate-errors')
driver = uc.Chrome(options=chrome_options,
version_main=137,
seleniumwire_options=proxy_options)
I'm not sure if undetected-chromedriver supports authenticated proxies. I've checked online and asked AI but I can't find any working solutions so I'm trying here for help.