Skip to content

Instantly share code, notes, and snippets.

@some-stuff
Created August 16, 2014 14:02
Show Gist options
  • Save some-stuff/6a3a6f52cce30e36f1a5 to your computer and use it in GitHub Desktop.
Save some-stuff/6a3a6f52cce30e36f1a5 to your computer and use it in GitHub Desktop.
Download file
def download(url, dest):
with urllib.request.urlopen(url) as response, open(dest, 'wb') as out_file:
shutil.copyfileobj(response, out_file)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment