fsdfds
This commit is contained in:
parent
0bb74dd9d8
commit
09a86d2b00
1 changed files with 2 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue