Embedded youtube video

master
Bob Mottram 2019-08-20 18:27:23 +01:00
parent 0f4e269734
commit edb8746d84
1 changed files with 9 additions and 0 deletions

View File

@ -1019,6 +1019,15 @@ def addEmbeddedVideo(content: str) -> str:
content=content+"<iframe src=\"https://player.vimeo.com/video/"+url+"\" width=\"100%\" height=\"100%\" frameborder=\"0\" allow=\"autoplay; fullscreen\" allowfullscreen></iframe>" content=content+"<iframe src=\"https://player.vimeo.com/video/"+url+"\" width=\"100%\" height=\"100%\" frameborder=\"0\" allow=\"autoplay; fullscreen\" allowfullscreen></iframe>"
return 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+"<iframe src=\"https://www.youtube.com"+url+"\" width=\"100%\" height=\"100%\" frameborder=\"0\" allow=\"autoplay; fullscreen\" allowfullscreen></iframe>"
return content
return content
def individualPostAsHtml(baseDir: str, \ def individualPostAsHtml(baseDir: str, \
session,wfRequest: {},personCache: {}, \ session,wfRequest: {},personCache: {}, \
nickname: str,domain: str,port: int, \ nickname: str,domain: str,port: int, \