Skip to content

Instantly share code, notes, and snippets.

@levlaz
Last active August 29, 2015 14:25
Show Gist options
  • Save levlaz/6e2bb355889179afe1df to your computer and use it in GitHub Desktop.
Save levlaz/6e2bb355889179afe1df to your computer and use it in GitHub Desktop.
Gravatar Hash
# import code for encoding urls and generating md5 hashes
import urllib, hashlib
def get_url(email):
gravatar_url = "http://www.gravatar.com/avatar/" + hashlib.md5(email.lower()).hexdigest() + "?"
return gravatar_url
print get_url("[email protected]")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment