开发者

urlopen windows ftp error

开发者 https://www.devze.com 2023-04-03 17:27 出处:网络
This code works perfectly at linux, but windows at there are errors. What\'s wrong? import urllib, urllib2

This code works perfectly at linux, but windows at there are errors. What's wrong?

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: >


Check if you have some proxy settings in your Internet Explorer: Menu Extras->Internet Options, there Connections->"LAN settings" (or something similar). If you have a Proxy server setting, urllib will not work.

0

精彩评论

暂无评论...
验证码 换一张
取 消