I am trying to download precipitation data from an ftp server. The code that I am using is this, but am still getting errors.
import urllib2 urlretrieve("http://ftp.cpc.ncep.noaa.gov/fews/fewsdata/africa/arc2/geotiff/", "folder link")
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It only takes a minute to sign up.Sign up to join this community
Use an ftp library
example for listing data
from ftplib import FTP host = r'ftp.cpc.ncep.noaa.gov/fews/fewsdata/africa/arc2/geotiff' #for example ftp.login("anonymous", "ftplib-example-1") data =  ftp.dir(data.append) ftp.quit() for line in data: print line