Skip to content

Instantly share code, notes, and snippets.

@alexdzul
Last active September 25, 2015 02:41
Show Gist options
  • Save alexdzul/64771f8278019ddeb3ab to your computer and use it in GitHub Desktop.
Save alexdzul/64771f8278019ddeb3ab to your computer and use it in GitHub Desktop.
Obteniendo url de imagen gravatar desde Python
import hashlib
def get_url_gravatar(email):
"""
Obtenemos la url del gravatar del email que se nos proporcione.
"""
m = hashlib.md5()
m.update(email.encode('utf-8'))
url = "http://www.gravatar.com/avatar/{0}.jpg?s=300".format(m.hexdigest())
return url
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment