Created
April 5, 2021 20:57
-
-
Save claraj/df5baef95f124cc0db4e42ae1f6f279b 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 requests | |
kitten_picture_url = 'https://placekitten.com/600/400' | |
response = requests.get(kitten_picture_url) | |
with open('kitten.jpg', 'wb') as file: | |
for chunk in response.iter_content(): | |
file.write(chunk) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment