URLLIB and PROXY
Sébastien SAUVAGE
nospam at sebsauvage.net
Mon Jan 28 12:24:27 EST 2002
"A" <printers at sendme.cz> wrote in news:mailman.1012234658.29707.python-
list at python.org:
> Hi,
> Is there anybody who has ever used
> URLLIB together with PROXY successfully?
> I tried
>
> import os,urllib
> os.environ["http_proxy"]='http://209.242.141.249:8080'
> RUR=urllib.urlretrieve('http://www.seznam.cz/index.html','Saved.htm'
> )
>
> but I do not think it does work.
> I will get the page but it does not go through proxy.
It worked for me.
I used the same syntax:
os.environ['http_proxy'] = 'http://155.124.209.197:3128'
page = urllib.urlopen('http://sebsauvage.net/index.html').read()
Note that the current version of Python/urllib does not support password-
access proxies.
--
Sébastien SAUVAGE
sebsauvage at sebsauvage dot net
http://sebsauvage.net
More information about the Python-list
mailing list