Created
March 11, 2017 17:33
-
-
Save wklm/c615e7d5eb3422fae6ae7bd3090b4a3a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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