From b9453bac037e19602d449e1f1d917754a42ffcba Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sat, 13 Aug 2022 07:06:53 +0200 Subject: [PATCH] replace "https://imgur.com/" with "https://i.imgur.com/" for the sake of mobilecels --- files/helpers/sanitize.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py index b8b0ecb94..ae010e4e3 100644 --- a/files/helpers/sanitize.py +++ b/files/helpers/sanitize.py @@ -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)