0

I wrote the code refrencing form Running Selenium Webdriver with a proxy in Python. But for some reason when that webpage of "whatsmyip" opens up, my ip is still the old one not "80.48.119.28".

from selenium import webdriver
from selenium.webdriver.common.proxy import Proxy, ProxyType
from selenium.webdriver.chrome.service import Service
from webdriver_manager.chrome import ChromeDriverManager

prox = Proxy()
prox.proxy_type = ProxyType.MANUAL
prox.http_proxy = "80.48.119.28:8080"
prox.https_proxy = "80.48.119.28:8080"

capabilities = webdriver.DesiredCapabilities.CHROME
prox.add_to_capabilities(capabilities)

driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()), desired_capabilities=capabilities)
url = "https://whatismyipaddress.com/"
driver.get(url)

Any idea how to fix this?

0 Answers0