handle exception

pull/225/head
Aevann 2024-02-24 00:17:40 +02:00
parent 2a8ce229df
commit dc5cfe6831
1 changed files with 2 additions and 1 deletions

View File

@ -304,7 +304,8 @@ def handle_youtube_links(url):
t = minutes*60 + seconds
html = f'<lite-youtube videoid="{id}" params="&modestbranding=1'
if t:
html += f'&start={int(t)}'
try: html += f'&start={int(t)}'
except: abort(400, f"Something is wrong with the url you submitted ({url}) and it couldn't be parsed.")
html += '"></lite-youtube>'
return html