Created
April 3, 2021 11:48
-
-
Save lmeulen/760df897f1e5b0a51bb23bc50b2ef529 to your computer and use it in GitHub Desktop.
crowdedness_download_gtfs
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
if not os.path.exists(os.path.join(GTFSDIR,'gtfs-nl.zip')): | |
url = 'http://gtfs.ovapi.nl/nl/gtfs-nl.zip' | |
with requests.get(url, stream=True) as r: | |
r.raise_for_status() | |
with open(os.path.join(GTFSDIR,'gtfs-nl.zip'), 'wb') as f: | |
for chunk in r.iter_content(chunk_size=1073741824): | |
f.write(chunk) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment