From 75ad5b34f2d5d30be1974623df7aafc9e8c2ec8a Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Thu, 25 Aug 2022 00:02:06 +0200 Subject: [PATCH] fix youtube embedding --- 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 e30e574e5..9d2042d20 100644 --- a/files/helpers/sanitize.py +++ b/files/helpers/sanitize.py @@ -445,12 +445,13 @@ def normalize_url(url): url = url.replace("https://youtu.be/", "https://youtube.com/watch?v=") \ .replace("https://music.youtube.com/watch?v=", "https://youtube.com/watch?v=") \ + .replace("https://www.youtube.com", "https://youtube.com") \ .replace("https://youtube.com/shorts/", "https://youtube.com/watch?v=") \ + .replace("https://youtube.com/v/", "https://youtube.com/watch?v=") \ .replace("https://mobile.twitter.com", "https://twitter.com") \ .replace("https://m.facebook.com", "https://facebook.com") \ .replace("https://m.wikipedia.org", "https://wikipedia.org") \ .replace("https://m.youtube.com", "https://youtube.com") \ - .replace("https://www.youtube.com", "https://youtube.com") \ .replace("https://www.twitter.com", "https://twitter.com") \ .replace("https://www.instagram.com", "https://instagram.com") \ .replace("https://www.tiktok.com", "https://tiktok.com") \