python urllib的问题

mud*_*der 4 python urllib

我尝试使用urllib.urlopen下载网页时收到错误.我已禁用Windows防火墙和我的AV,所以它不是那样.我可以在浏览器中访问这些页面.我甚至重新安装了python以排除它是一个破坏的urllib.任何帮助将不胜感激.

>>> import urllib
>>> h = urllib.urlopen("http://www.google.com").read()

Traceback (most recent call last):
  File "<pyshell#1>", line 1, in <module>
    h = urllib.urlopen("http://www.google.com").read()
  File "C:\Python26\lib\urllib.py", line 86, in urlopen
    return opener.open(url)
  File "C:\Python26\lib\urllib.py", line 205, in open
    return getattr(self, name)(url)
  File "C:\Python26\lib\urllib.py", line 344, in open_http
    h.endheaders()
  File "C:\Python26\lib\httplib.py", line 904, in endheaders
    self._send_output()
  File "C:\Python26\lib\httplib.py", line 776, in _send_output
    self.send(msg)
  File "C:\Python26\lib\httplib.py", line 735, in send
    self.connect()
  File "C:\Python26\lib\httplib.py", line 716, in connect
    self.timeout)
  File "C:\Python26\lib\socket.py", line 514, in create_connection
    raise error, msg
IOError: [Errno socket error] [Errno 10061] No connection could be made because the target machine actively refused it
>>> 
Run Code Online (Sandbox Code Playgroud)

myk*_*hal 5

情况可能如此:

刚刚发现我通过互联网选​​项设置代理的问题,该代理脱机了,我的python shell也是如此.