From d0ff33ba63ba7fb4504e51b9f595974f5aec49ce Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Thu, 18 Nov 2021 23:29:42 +0200 Subject: [PATCH] fsdfds --- 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 c1184ac81..c6327890b 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -579,7 +579,8 @@ def submit_post(v): elif "youtu" in domain: yt_id = re.match(re.compile("^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|shorts\/|\&v=)([^#\&\?]*).*"), url).group(2) params = parse_qs(urlparse(url).query) - t = params.get('t', params.get('start', [0]))[0].replace('s','') + t = params.get('t', params.get('start', [0]))[0] + if isinstance(t, str): t = t.replace('s','') if t: embed = f"https://youtube.com/embed/{yt_id}?start={t}" else: embed = f"https://youtube.com/embed/{yt_id}" elif app.config['SERVER_NAME'] in domain and "/post/" in url and "context" not in url: