diff --git a/app.py b/app.py index 2612777..8972ca7 100644 --- a/app.py +++ b/app.py @@ -49,7 +49,8 @@ def emojo(domain): else: show_animated = False - url = urllib.parse.urlunsplit(("https", domain, "/api/v1/custom_emojis", "", "")) + scheme = "http" if domain.endswith(".onion") else "https" + url = urllib.parse.urlunsplit((scheme, domain, "/api/v1/custom_emojis", "", "")) try: response = requests.get(url) except requests.exceptions.RequestException: