Aevann 2023-05-05 03:23:54 +03:00
parent 6eec81c2ec
commit b34b757038
1 changed files with 2 additions and 2 deletions

View File

@ -5,7 +5,7 @@ import signal
from functools import partial
from os import path, listdir
from typing import Any
from urllib.parse import parse_qs, urlparse
from urllib.parse import parse_qs, urlparse, unquote
import bleach
from bleach.css_sanitizer import CSSSanitizer
@ -629,10 +629,10 @@ def normalize_url(url):
.replace("https://nitter.42l.fr/", "https://twitter.com/") \
.replace("https://nitter.lacontrevoie.fr/", "https://twitter.com/") \
.replace("/giphy.gif", "/giphy.webp") \
.replace("%2e", ".").replace("%2E", ".") \
url = imgur_regex.sub(r'\1_d.webp?maxwidth=9999&fidelity=grand', url)
url = giphy_regex.sub(r'\1.webp', url)
url = unquote(url)
return url