From edb8746d843adee29f916d897e063ed21a1f8804 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 20 Aug 2019 18:27:23 +0100 Subject: [PATCH] Embedded youtube video --- webinterface.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/webinterface.py b/webinterface.py index 9ac7a25c..d435f2a0 100644 --- a/webinterface.py +++ b/webinterface.py @@ -1017,6 +1017,15 @@ def addEmbeddedVideo(content: str) -> str: if '<' in url: url=url.split('<')[0] content=content+"" + return content + + if '"https://www.youtube.com' in content: + url=content.split('"https://www.youtube.com')[1] + if '"' in url: + url=url.split('"')[0] + content=content+"" + return content + return content def individualPostAsHtml(baseDir: str, \