Guest User

Untitled

a guest
May 26th, 2016
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.16 KB | None | 0 0
  1. import urllib
  2. from io import BytesIO
  3. url = response['picture']['data']['url']
  4. url = urllib.request.urlopen(url)
  5. file = BytesIO(url.read())
  6. img = File(file)
Add Comment
Please, Sign In to add comment