replace giphy.gif with giphy.webp

master
Aevann 2022-12-25 02:54:47 +02:00
parent 108e7781ea
commit 366f445f2e
1 changed files with 2 additions and 1 deletions

View File

@ -471,7 +471,8 @@ def normalize_url(url):
.replace("https://imgur.com/", "https://i.imgur.com/") \
.replace("https://nitter.net/", "https://twitter.com/") \
.replace("https://nitter.42l.fr/", "https://twitter.com/") \
.replace("https://nitter.lacontrevoie.fr/", "https://twitter.com/")
.replace("https://nitter.lacontrevoie.fr/", "https://twitter.com/") \
.replace("/giphy.gif", "/giphy.webp")
url = imgur_regex.sub(r'\1_d.webp?maxwidth=9999&fidelity=grand', url)
url = giphy_regex.sub(r'\1.webp', url)