How to download a file via FTP with Python ftplib

后端 未结 7 1783
名媛妹妹
名媛妹妹 2020-12-05 12:51

I have the following code which easily connects to the FTP server and opens a zip file. I want to download that file into the local system. How to do that?

#         


        
7条回答
  •  感动是毒
    2020-12-05 13:13

    If you are not limited to using ftplib you can also give wget module a try. Here, is the snippet

    import wget
    file_loc = 'http://www.website.com/foo.zip'
    wget.download(file_loc)
    

提交回复
热议问题