replace "https://imgur.com/" with "https://i.imgur.com/" for the sake of mobilecels

remotes/1693045480750635534/spooky-22
Aevann1 2022-08-13 07:06:53 +02:00
parent d0083b579f
commit b9453bac03
1 changed files with 2 additions and 1 deletions

View File

@ -452,7 +452,8 @@ def normalize_url(url):
.replace("https://www.streamable.com", "https://streamable.com") \
.replace("https://streamable.com/", "https://streamable.com/e/") \
.replace("https://streamable.com/e/e/", "https://streamable.com/e/") \
.replace("https://search.marsey.cat/#", "https://camas.unddit.com/#")
.replace("https://search.marsey.cat/#", "https://camas.unddit.com/#") \
.replace("https://imgur.com/", "https://i.imgur.com/")
url = imgur_regex.sub(r'\1_d.webp?maxwidth=9999&fidelity=high', url)
url = giphy_regex.sub(r'\1.webp', url)