From baaf4c9e2793f02c474fdf6fa397f8e3ccdba9ba Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 22 Oct 2019 09:44:33 +0100 Subject: [PATCH] Remove trailing youtube params --- webinterface.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/webinterface.py b/webinterface.py index 95545163..d8365731 100644 --- a/webinterface.py +++ b/webinterface.py @@ -1564,6 +1564,8 @@ def addEmbeddedVideoFromSites(translate: {},content: str,width=400,height=300) - url=content.split('"'+videoSite)[1] if '"' in url: url=url.split('"')[0].replace('/watch?v=','/embed/') + if '&' in url: + url=url.split('&')[0] content=content+"
" return content @@ -1573,6 +1575,8 @@ def addEmbeddedVideoFromSites(translate: {},content: str,width=400,height=300) - url=content.split('"'+videoSite)[1] if '"' in url: url=url.split('"')[0].replace('/watch?v=','/embed/') + if '&' in url: + url=url.split('&')[0] content=content+"
" return content