Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import wget
import time
from datetime import date, timedelta
dmy = 20170424
while True:
try:
t=time.strptime(str(dmy),'%Y%m%d')
newdate=date(t.tm_year,t.tm_mon,t.tm_mday)+timedelta(1)
url = 'http://www.wst.univie.ac.at/~wanek/dbsprf/dbs_vo_' + str(newdate.strftime('%Y%m%d')) + '.pdf'
try:
filename = wget.download(url)
print('pobralo sie' + str(newdate.strftime('%Y%m%d')))
except:
print('nie' + str(newdate.strftime('%Y%m%d')))
except:
pass
dmy -= 1
if dmy < 20110531:
break
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.