代理不起作用的Firefox配置文件selenium webdriver python

代理不起作用的Firefox配置文件selenium webdriver python,python,selenium,firefox,webdriver,Python,Selenium,Firefox,Webdriver,代理未随此代码更改。是否有任何更改或更好的方法 from selenium import webdriver _drivPath = r"C:\Users\abc\Desktop\geckodriver.exe" profile = webdriver.FirefoxProfile() profile.set_preference("network.proxy.type", 1) profile.set_preference("network.proxy.http", "96.42.212.

代理未随此代码更改。是否有任何更改或更好的方法

from selenium import webdriver

_drivPath = r"C:\Users\abc\Desktop\geckodriver.exe"

profile = webdriver.FirefoxProfile()
profile.set_preference("network.proxy.type", 1)
profile.set_preference("network.proxy.http", "96.42.212.235")
profile.set_preference("network.proxy.http_port", 8080)
profile.update_preferences()

_driver = webdriver.Firefox(executable_path=_drivPath, 
firefox_profile=profile)
_driver.get("https://whatismyipaddress.com")

因此,为了澄清,
whatismyipaddress
为您提供了真实的IP,并且您希望使用96.42.212.235?是的,在使用“whatismyipaddress”中的代理之后,这仍然显示了真实的IP。我如何知道代理是否正常工作?有没有办法把它记录在某个地方,或者获取webdriver代理或任何解决方案?因此,为了澄清,
什么是MyIpAddress
为您提供了真正的IP,并且您希望使用96.42.212.235?是的,在使用“whatismyipaddress”中的代理之后,它仍然显示了真正的IP。我如何知道代理是否正常工作?有没有办法把它记录在某个地方,或者获取webdriver代理或其他解决方案?