Created
February 28, 2023 15:33
-
-
Save pintman/6c74cbfafbe56985a79b9f8a6503e7dd 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 urllib.request | |
import datetime | |
def download(url): | |
""" | |
Download and return data from the given URL. | |
""" | |
data = urllib.request.urlopen(url).read() | |
return data | |
def save(data, filename): | |
'Save data into the given filename.' | |
with open(filename, 'wt') as f: | |
f.write(data) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment