Created
January 29, 2013 20:06
-
-
Save fmasanori/4667293 to your computer and use it in GitHub Desktop.
Python 3.x Facebook Profile Image
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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