Q
Q
qlkvg2016-12-05 22:07:42
Python
qlkvg, 2016-12-05 22:07:42

How to make friends python, selenium and proxy?

There is a parser written in python+selenium+phantomjs. At home on a local machine (beeline Internet behind NAT), everything works fine. At work, it doesn’t want to work through a proxy at all and falls on the initialization of the webdriver:

driver = webdriver.PhantomJS(service_args=['--load-images=no', '--webdriver=4444', '--disk-cache=true', '--ignore-ssl-errors=true', '--max-disk-cache-size=100000',
    "--proxy=192.168.2.1:8080", "--proxy-type=http"])

with an error
urlopen error [Errno 10061] No connection could be made because the target machine actively refused it

The same proxy settings in firefox work fine.
I've already broken my head. What can be wrong?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Max, 2016-12-05
@MaxDukov

and proxy without authorization?
wget/curl on the same pc what do they say?

M
masterlir, 2017-11-18
@masterlir

Dudes, if you finally managed to make friends between selenium and proxy. please write to me and if possible the code. And then I'm a Rubist, but it so happened that a selenium + proxy script is needed, but I can't do it myself.
[email protected]
Thanks Denis.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question