From d15e68f4f7acff5ccb0a94b206959773f2383b67 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Mon, 6 Sep 2021 21:54:41 +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 56119245e..d1ced7a92 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -626,7 +626,8 @@ def submit_post(v): except: embed = None elif "youtu" in domain: - yt_id = re.match(re.compile("^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|shorts\/|\&v=)([^#\&\?]*).*"), url).group(2) + try: yt_id = re.match(re.compile("^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|shorts\/|\&v=)([^#\&\?]*).*"), url).group(2) + except: embed = None if not yt_id or len(yt_id) != 11: embed = None else: params = parse_qs(urlparse(url).query)