【发布时间】:2013-09-14 05:25:06
【问题描述】:
如何将 Selenium 在 Python 中启动的 Firefox 的流量重定向到代理?我使用了网上建议的解决方案,但它们不起作用!
我试过了:
profile = webdriver.FirefoxProfile()
profile.set_preference("network.proxy.type", 1)
profile.set_preference("network.proxy.http", "54.213.66.208")
profile.set_preference("network.proxy.http_port", 80)
profile.update_preferences()
driver = webdriver.Firefox(profile)
【问题讨论】:
-
网络上可能有不止一种解决方案。你尝试了什么? (特别是,你试过this吗?)
-
我试过这个:profile = webdriver.FirefoxProfile() profile.set_preference("network.proxy.type", 1) profile.set_preference("network.proxy.http", "54.213 .66.208") profile.set_preference("network.proxy.http_port", 80) profile.update_preferences() driver = webdriver.Firefox(profile)
-
您的网址使用的是
http:还是https:? -
http.我午餐这个命令 driver.get("whatismyipaddress.com") 并且 ip 不是代理的 ip 而是通过 ip...
-
您知道如何进行这项工作吗?我有同样的问题,我正在使用 Firefox46
标签: python firefox selenium proxy