Skip to content

Instantly share code, notes, and snippets.

@fmasanori
Created January 29, 2013 20:06
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save fmasanori/4667293 to your computer and use it in GitHub Desktop.
Save fmasanori/4667293 to your computer and use it in GitHub Desktop.
Python 3.x Facebook Profile Image
import urllib.request
import json
user = 'fmasanori'
url = 'https://graph.facebook.com/'+user+'/picture?type=large'
figura = urllib.request.urlopen(url).read()
arquivo = user + '.jpg'
f = open (arquivo, 'wb')
f.write(figura)
f.close()
print (arquivo, 'gravado no seu diretório...')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment