【发布时间】:2019-01-25 16:48:53
【问题描述】:
我正在使用 Python 和 selenium 编写爬虫程序,once Chrome webdriver instance was created, is there a way to change the proxy IP dynamically?希望得到您的帮助,在此先感谢。
【问题讨论】:
标签: python selenium webdriver web-crawler
我正在使用 Python 和 selenium 编写爬虫程序,once Chrome webdriver instance was created, is there a way to change the proxy IP dynamically?希望得到您的帮助,在此先感谢。
【问题讨论】:
标签: python selenium webdriver web-crawler
我不相信您可以在不首先销毁并创建新的浏览器实例的情况下更改代理。在我实现代理的程序中,我有一个 for 循环创建一个新浏览器,然后将该浏览器作为参数传递给我创建的需要它的函数。也许我只是不知道动态执行此操作的方法,但我记得在创建浏览器实例时需要指定代理信息,所以我不认为您正在尝试做的事情是可能的......
【讨论】: