Reputation: 985
I'm using python + selenium to open pages with proxy So it's like:
self.mainBrowser = webdriver.Firefox(proxy=proxy); time.sleep(1)
where's
myProxy = proxy_ip + ":" + proxy_port
proxy = Proxy({
'proxyType': ProxyType.MANUAL,
'httpProxy': myProxy,
'ftpProxy': myProxy,
'sslProxy': myProxy,
'noProxy': '' # set this value as desired
})
I'm reading proxies dynamicly from online list(using selenium too). Some of proxies are broken so I want to take another one and try it. But when I'm opening proxy list with
br = webdriver.Firefox(proxy=None)
br.get(proxy_server)
It opens with my previous proxy(or maybe cannot connect, because i see no connection error which is same for broken proxies). How can I make it run without proxy?
Upvotes: 1
Views: 156
Reputation: 100
If proxy=None
is not working you can try settings it to your localhost with
String PROXY = "localhost:8080";
or something similar.
Alternatively, you can try to get the list of proxies using a tool that isn't selenium. Maybe with HttpUrlConnection
?
Upvotes: 1