Last active
August 10, 2020 02:04
-
-
Save zhangyoufu/b4257ac0e0bc16ba70a4b9fdd4981654 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/usr/bin/env python3 | |
import datetime | |
import requests | |
last = '20170807' | |
fmt = '%Y%m%d' | |
date = datetime.datetime.strptime(last, fmt).date() | |
today = datetime.date.today() | |
session = requests.Session() | |
while date < today: | |
date += datetime.timedelta(days=1) | |
url = 'http://download.microsoft.com/download/3/C/C/3CCD4756-7E5A-463C-AD50-E8C3F40F7C4C/%s_VLSC_DL_Catalog.xls' % date.strftime(fmt) | |
rsp = session.head(url) | |
if rsp.status_code != 404: | |
print(url) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://download.microsoft.com/download/3/C/C/3CCD4756-7E5A-463C-AD50-E8C3F40F7C4C/20180611_VLSC_DL_Catalog.xls
http://download.microsoft.com/download/3/C/C/3CCD4756-7E5A-463C-AD50-E8C3F40F7C4C/APOC_VL_Catalogue_March2018.xlsx