Skip to content

Instantly share code, notes, and snippets.

@claraj
Created April 5, 2021 20:57
Show Gist options
  • Save claraj/df5baef95f124cc0db4e42ae1f6f279b to your computer and use it in GitHub Desktop.
Save claraj/df5baef95f124cc0db4e42ae1f6f279b to your computer and use it in GitHub Desktop.
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