remotes/1693045480750635534/spooky-22
Aevann1 2021-11-18 23:29:42 +02:00
parent caeeb0ddde
commit d0ff33ba63
1 changed files with 2 additions and 1 deletions

View File

@ -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: