Last active
October 4, 2019 13:26
-
-
Save wasi0013/dfa8b2707e367e6abfd9df7511c2cee4 to your computer and use it in GitHub Desktop.
how to download tiny files using python requests
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 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