Skip to content

Instantly share code, notes, and snippets.

@avelino
Created March 26, 2014 17:40
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 avelino/9788998 to your computer and use it in GitHub Desktop.
Save avelino/9788998 to your computer and use it in GitHub Desktop.
import requests
o = requests.get("http://2.bp.blogspot.com/_jVMUtLCFEAQ/TLFcES1SvrI/AAAAAAAAAQ0/uvR8aUF6CnA/s320/lerolero.jpg", stream=True)
with open('sample.jpg', 'wb') as f:
f.write(o.content)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment