support onions
This commit is contained in:
parent
6930d09056
commit
418ab4fd8d
3
app.py
3
app.py
|
@ -49,7 +49,8 @@ def emojo(domain):
|
||||||
else:
|
else:
|
||||||
show_animated = False
|
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:
|
try:
|
||||||
response = requests.get(url)
|
response = requests.get(url)
|
||||||
except requests.exceptions.RequestException:
|
except requests.exceptions.RequestException:
|
||||||
|
|
Loading…
Reference in New Issue