I have a list of free https proxies, taken from sslproxies. I am writing a script in Python where I want to switch IP addresses regularly between interactions with websites. I was testing how this works with Selenium Wire and noticed upon testing that my IP address does not actually change after applying a proxy. There are no errors. Below the script I use:
from seleniumwire import webdriver
PROXY = # this is taken from the free proxies, syntax is "http://IP:port"
seleniumwire_options = {
'proxy': {
'http': PROXY,
'https': PROXY,
},
}
driver = webdriver.Chrome(seleniumwire_options = seleniumwire_options)
driver.get("/")
Unfortunately, the above code simply shows my own IP address when I go to the test website whatismyipaddress. Does anyone know how I can 'enable' the proxy? I have also tried doing it by declaring driver.proxy = {'http': PROXY, 'https': PROXY,}.
I have a list of free https proxies, taken from sslproxies.. I am writing a script in Python where I want to switch IP addresses regularly between interactions with websites. I was testing how this works with Selenium Wire and noticed upon testing that my IP address does not actually change after applying a proxy. There are no errors. Below the script I use:
from seleniumwire import webdriver
PROXY = # this is taken from the free proxies, syntax is "http://IP:port"
seleniumwire_options = {
'proxy': {
'http': PROXY,
'https': PROXY,
},
}
driver = webdriver.Chrome(seleniumwire_options = seleniumwire_options)
driver.get("http://whatismyipaddress/")
Unfortunately, the above code simply shows my own IP address when I go to the test website whatismyipaddress. Does anyone know how I can 'enable' the proxy? I have also tried doing it by declaring driver.proxy = {'http': PROXY, 'https': PROXY,}.
Share Improve this question edited Mar 12 at 16:09 toolic 62.3k21 gold badges79 silver badges128 bronze badges asked Mar 12 at 15:37 GizmusGizmus 1 2- for your use you should just use a system-wide proxy here. No need to set any options in Selenium or wire. – browsermator Commented Mar 19 at 18:09
- I understand what you mean, but that would mean I cannot change IP in an automated fashion after every X clicks/interactions on the webdriver, correct? – Gizmus Commented Mar 20 at 19:41
1 Answer
Reset to default 1Free proxies from sites like sslproxies. are often unreliable or dead. Try these fixes:
Check Proxy Status: Test if the proxy is alive using
requests.get("http://httpbin./ip", proxies={"http": PROXY, "https": PROXY})
.Use
verify_ssl=False
: Some free proxies don't support SSL verification.Use Paid/Rotating Proxies: Free proxies often fail. Consider services like Bright Data or ScraperAPI.