Skip to content

Instantly share code, notes, and snippets.

@wasi0013
Last active October 4, 2019 13:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wasi0013/dfa8b2707e367e6abfd9df7511c2cee4 to your computer and use it in GitHub Desktop.
Save wasi0013/dfa8b2707e367e6abfd9df7511c2cee4 to your computer and use it in GitHub Desktop.
how to download tiny files using python requests
import requests
filename = "logo.png"
document_url = "https://wasi0013.files.wordpress.com/2018/11/my_website_logo_half_circle_green-e1546027650125.png"
with open(filename, 'wb') as f:
f.write(requests.get(document_url).content)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment