[英]Python selenium phantomJS with luminati proxy
I am trying to get a selenium working with phantomJS routing everything through a luminati.io proxy with: 我正在尝试通过luminati.io代理使用phantomJS处理所有内容的selenium:
service_args = [
'--proxy=http://lum-customer-<CUSTOMER>-zone-<ZONE>:<PASSWORD>@zproxy.luminati.io:22225',
]
driver = webdriver.PhantomJS(service_args=service_args)
driver.set_window_size(1120, 550)
driver.get(url)
where <CUSTOMER>
, <ZONE>
, and <PASSWORD>
have been replaced appropriately. 其中
<CUSTOMER>
, <ZONE>
和<PASSWORD>
已被适当替换。 However, requests are not being routed through the proxy. 但是,请求不会通过代理进行路由。 The url is in a bit of a strange format.
网址有点奇怪。 Does anyone have any suggestions how to make this work?
有没有人有任何建议如何使这项工作?
I took a look at the examples on their website, and I would suggest sending service_arg
parameters like the ones for they suggest for curl
. 我看了一下他们网站上的例子,我建议发送
service_arg
参数,就像他们为curl
建议的那样。
Try this: 尝试这个:
service_args = [
'--proxy=zproxy.luminati.io:22225',
'--proxy-user=lum-customer-<CUSTOMER>-zone-<ZONE>:<PASSWORD>',
]
driver = webdriver.PhantomJS(service_args=service_args)
driver.set_window_size(1120, 550)
driver.get(url)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.