Paul's Programming Notes
PostsRSSGithub

Downloading Files With Python's Requests Module

19 Jan 2015

http://docs.python-requests.org/en/latest/user/quickstart/#binary-response-content

From the example:

>>> from PIL import Image
>>> from StringIO import StringIO
>>> i = Image.open(StringIO(r.content))
pythonpython-requests

Related posts

  • Ordered Post Data - Python Requests 23 Mar 2014
  • UnicodeEncodeError: 'ascii' codec can't encode character u'\ufffd' in position 12: ordinal not in range(128) 19 Jul 2013
  • requests.exceptions.SSLError: [Errno 1] _ssl.c:504: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed 19 Jul 2013
© 2026. All rights reserved.