Skip to content

Instantly share code, notes, and snippets.

Last active Jun 5, 2021
What would you like to do?
Download a file using Python
import requests
url = ''
r = requests.get(url, allow_redirects=True)
with open('facebook.ico', 'wb') as f:
import urllib
urllib.request.urlretrieve("", "file.gz")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment