python - urlopen windows ftp 错误

标签 python urllib2 urllib

此代码在 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/

相关文章:

python - 是什么导致了这个神秘的 pylint E1101 错误?

python - 预测网站是否返回相同的内容

Python 和向 urllib 请求添加数据的新方法

Python urllib 和 urllib2 不打开本地主机 URL?

Python 2.6 pxssh 登录失败时生成密码 GUI

python - 如何从 scikit-learn 运行和解释 Fisher 的线性判别分析

python - "WindowsError: [Error 5] Access is denied"使用 urllib2

带有自签名证书的 Python 3 urllib

Python 图像处理 - 如何删除某些轮廓并将值与周围像素混合?

Python urllib2 强制 IPv4