urllib.urlopen

JabaPyth jabasyth at gmail.com
Sun Dec 18 01:40:01 EST 2005


I tried using urllib2 and this is what i got:
>>import urllib2
>>the_url = 'http://www.google.com'
>>req = urllib2.Request(the_url)
>>handle = urllib2.urlopen(req)
Traceback (most recent call last):
  File "<input>", line 1, in ?
  File "C:\Python24\lib\urllib2.py", line 130, in urlopen
    return _opener.open(url, data)
  File "C:\Python24\lib\urllib2.py", line 358, in open
    response = self._open(req, data)
  File "C:\Python24\lib\urllib2.py", line 376, in _open
    '_open', req)
  File "C:\Python24\lib\urllib2.py", line 337, in _call_chain
    result = func(*args)
  File "C:\Python24\lib\urllib2.py", line 1021, in http_open
    return self.do_open(httplib.HTTPConnection, req)
  File "C:\Python24\lib\urllib2.py", line 996, in do_open
    raise URLError(err)
URLError: <urlopen error (11001, 'getaddrinfo failed')>




More information about the Python-list mailing list