mirror of
https://github.com/minetest/contentdb.git
synced 2024-12-22 22:12:24 +01:00
12 lines
271 B
Python
12 lines
271 B
Python
import hashlib
|
|
|
|
|
|
def get_gravatar(email: str):
|
|
size = 64
|
|
rating = "g"
|
|
default = "retro"
|
|
url = "https://secure.gravatar.com/avatar/"
|
|
email_hash = hashlib.md5(email.encode("utf-8")).hexdigest()
|
|
link = f"{url}{email_hash}?s={size}&d={default}&r={rating}"
|
|
return link
|