urllib.urlopen and proxies

Siggy Brentrup bsb at winnegan.de
Wed Mar 7 07:44:11 EST 2001


Paul Moore <paul.moore at uk.origin-it.com> writes:


[...]

> >>> f = urllib2.urlopen('http://www.python.org/')
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
>   File "c:\applications\python\lib\urllib2.py", line 137, in urlopen
>     return _opener.open(url, data)
>   File "c:\applications\python\lib\urllib2.py", line 325, in open
>     '_open', req)
>   File "c:\applications\python\lib\urllib2.py", line 304, in
> _call_chain
>     result = func(*args)
>   File "c:\applications\python\lib\urllib2.py", line 747, in http_open
>     raise URLError(err)
> urllib2.URLError: <urlopen error host not found>
> 
> I'll see if I can understand what is going on when I get a chance, but
> I don't know how far I'll get...

Well, obviously I should have tested before posting :-( There's one
omission in my code as well as three typos in urllib2.py (sample and
patch attached)

Siggy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: proxy_auth.py
Type: application/octet-stream
Size: 559 bytes
Desc: proxy authorization
URL: <http://mail.python.org/pipermail/python-list/attachments/20010307/c1125dc3/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: urllib2.diff
Type: text/x-patch
Size: 654 bytes
Desc: Fix typos in urllib2.py
URL: <http://mail.python.org/pipermail/python-list/attachments/20010307/c1125dc3/attachment.bin>


More information about the Python-list mailing list