更新时间:2023-09-18 17:20:22
下面是如何在Python中设置PhantomJs代理的示例.您可以更改代理类型:socks5/http.
Below is the example of how to set proxy for PhantomJs in Python. You may change proxy type: socks5/http.
service_args = [
'--proxy=127.0.0.1:9999',
'--proxy-type=socks5',
]
browser = webdriver.PhantomJS('../path_to/phantomjs',service_args=service_args)