Good day!
Tell me how to connect to an FTP server through a proxy server? Without a proxy, I connect via ftplib, and everything works fine. Maybe to work through a proxy use pycurl or some other module?
Thank!
#!/usr/bin/env python from ftplib import FTP #----Load file from FTP server---------------- def GetFile(ftp,files): folder = '/home/ivb/Bases/' for f in files: print '********************' print 'Download the file: %s' % f ftp.retrbinary('RETR ' + f, open(folder + f,'wb').write) ftp.quit() ftp = FTP('92.126.x.x') ftp.login('USER','PASS') ftp.cwd('/Share/Base') files = ['ASDNR.backup','ahov.backup','Doc.backup','si.backup', 'gar.backup','Navsys.backup','Tablchs.backup','Report_MCHS.backup'] GetFile(ftp,files)