此代码在 linux 下完美运行,但在 windows 上存在错误。怎么了?
import urllib, urllib2
a = 'ftp://ftp.arin.net/pub/stats/arin/delegated-arin-latest'
urllib.urlopen(a)
IOError: [Errno ftp error] proxy support for ftp protocol currently not implemented
urllib2.urlopen(a)
URLError: <urlopen error ftp error: >
最佳答案
检查您的 Internet Explorer 中是否有一些代理设置:菜单 Extras->Internet 选项,那里有连接->“LAN 设置”(或类似的东西)。如果您有代理服务器设置,urllib 将不起作用。
关于python - urlopen windows ftp 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7367713/