Last year I used these codes to retrieve data from FTP database, today I noticed the database changed to HTTP. Now I don't know how to retrieve data.
ftp=ftplib.FTP ('ftp-cdc.dwd.de')
ftp.login ('anonymous' , '1234')
#ftp directory
ftp.cwd('pub/CDC/grids_germany/hourly/radolan/recent/bin/')
fnbase ='raa01-rw_10000-'
fnend ='-dwd---bin.gz'
#!!!!!!!!!!!!!!!!!!!!!!!!!
# insert the date and time
start = "2019-05-20 11:50:00"
end = "2019-05-22 11:50:00"
#!!!!!!!!!!!!!!!!!!!!!!!!!
dtimes = wrl.util.from_to(start, end, 60*60 )
for dtime in dtimes:
date=dtime.strftime("%y%m%d%H%M")
fn = fnbase + str (date) + fnend
with open(fn ,'wb') as fhandle:
ftp.retrbinary('RETR %s' % fn, fhandle.write)
print (str(date), 'rw downloaded')
I want to download multiple data, then turn them to TIF file and at the end make a sum of daily/monthly TIF fil.
Thank you
Shiva