Python 3 ftplib error “Name or service not known”

血红的双手。 提交于 2019-11-28 13:05:53

The host argument of FTP constructor takes, as the name suggests, a hostname only, like library.daisy.org. You are passing in a whole URL.

This is correct:

ftp = ftplib.FTP("library.daisy.org")

The full path goes to an argument of the RETR command:

ftp.retrbinary("RETR User_****/Wise & Otherwise-22.zip", open(filename, 'wb').write)

As you are connecting via proxy, you have to cater for that too.

There are lot of questions here covering that part. But you didn't tell us what kind of proxy you are using, so I cannot be more specific.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!