Problem with urllib

Posted by Eva on Stack Overflow See other posts from Stack Overflow or by Eva
Published on 2010-05-21T02:11:44Z Indexed on 2010/05/21 2:20 UTC
Read the original article Hit count: 380

Filed under:
|
|

I wrote this code:

import urllib
proxies = {'http': 'http://112.65.135.54:8080/'}
opener = urllib.FancyURLopener(proxies)
r = opener.open("http://www.python.org/")
print r.read()

and when I execute it this program works fine, and send for me source code of python.org But when i use this:

import urllib
proxies = {'http': 'http://80.176.245.196:1080/'}
opener = urllib.FancyURLopener(proxies)
r = opener.open("http://www.python.org/")
print r.read()

this program does not send me the source code of python.org What am I going to do?

© Stack Overflow or respective owner

Related posts about python

Related posts about urllib