You are not logged in.

#1 2016-05-04 10:09:38

MarthaParkin
Member
Registered: 2016-03-19
Posts: 232

Setting proxy in command line doesn't work for changing ip in python

Setting proxy in command line doesn't work for changing ip in python script.

I did

$ export http_proxy="http://user:password@proxy-server:port"
$ export https_proxy="https://user:password@proxy-server:port"
$ export ftp_proxy="http://user:password@proxy-server:port"

to set the proxy and it shows as active when I do

env | grep -i proxy

but when I try and run the python script where it opens xvfb/selenium and goes to a check ip page and prints the ip, the ip is still the original not the proxy.

Also when I try with

wget -q -O - checkip.dyndns.org

it too didn't show the proxy. In fact it showed nothing. Without the proxy enabled it showed my original IP; with the above 3 lines set it just goes back to the prompt with no message and no info.

So what am I missing.

I know I can set proxies in selenium which I usually do but I'm having issues with a particular site so need to do some testing setting them outside if I can.

Last edited by MarthaParkin (2016-05-04 10:27:04)

Offline

Board footer

Powered by FluxBB