From 8d8563ea8767634fc169bbf21ba7af7990342854 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Mon, 22 Nov 2021 15:51:32 +0200 Subject: [PATCH] fd --- files/routes/posts.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/files/routes/posts.py b/files/routes/posts.py index 16850c8097..cbe3161c4b 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -543,7 +543,8 @@ def submit_post(v): url = url.replace("old.reddit.com/gallery", "new.reddit.com/gallery") - url = url.replace("https://mobile.twitter.com", "https://twitter.com") + url = url.replace("https://mobile.twitter.com", "https://twitter.com").replace("https://m.facebook", "https://facebook").replace("https://m.wikipedia", "https://wikipedia").replace("https://m.youtube", "https://youtube") + if url.startswith("https://streamable.com/") and not url.startswith("https://streamable.com/e/"): url = url.replace("https://streamable.com/", "https://streamable.com/e/") parsed_url = urlparse(url)