From 5dd4b48529f47a6962a490f3495fa19547d357c5 Mon Sep 17 00:00:00 2001 From: "matthias@matsewe.de" Date: Wed, 12 Jun 2024 15:01:58 +0200 Subject: [PATCH] Adapt for youtube shorts --- app/routers/admin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/routers/admin.py b/app/routers/admin.py index e9d636c..362c8df 100644 --- a/app/routers/admin.py +++ b/app/routers/admin.py @@ -33,7 +33,7 @@ def get_youtube_id(url): youtube_regex = ( r'(https?://)?(www\.)?' '(youtube|youtu|youtube-nocookie)\.(com|be)/' - '(watch\?v=|embed/|v/|.+\?v=)?([^&=%\?]{11})') + '(watch\?v=|embed/|shorts/|v/|.+\?v=)?([^&=%\?]{11})') youtube_regex_match = re.match(youtube_regex, url) if youtube_regex_match: