简体   繁体   中英

Python+Selenium+PhantomJS with proxy list

In my script i used this method for working PhantomJS with proxy:

service_args = [
    '--proxy=0.0.0.0:3128',
    '--proxy-type=http',
    ]
browser = webdriver.PhantomJS(service_args=service_args)

Please tell me can I use a proxy list ? I need that script worked until the PhantomJS will pass through the all proxy in list? And how to implement that at the idle proxy, he wrote a message and move to the next? For example put detain 20 seconds and if there is no response from the proxy to go further.

Thank you advance

前一段时间,我遇到了同样的问题,没有比使用其他代理重新启动浏览器更好的了。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM