Support invidio.us links

main2
Bob Mottram 2019-10-01 12:25:10 +01:00
parent 68934d0a73
commit c9ec8d4d17
1 changed files with 8 additions and 0 deletions

View File

@ -1519,6 +1519,14 @@ def addEmbeddedVideoFromSites(translate: {},content: str,width=400,height=300) -
content=content+"<center><iframe src=\""+videoSite+url+"\" width=\""+str(width)+"\" height=\""+str(height)+"\" frameborder=\"0\" allow=\"autoplay; fullscreen\" allowfullscreen></iframe></center>"
return content
videoSite='https://invidio.us'
if '"'+videoSite in content:
url=content.split('"'+videoSite)[1]
if '"' in url:
url=url.split('"')[0].replace('/watch?v=','/embed/')
content=content+"<center><iframe src=\""+videoSite+url+"\" width=\""+str(width)+"\" height=\""+str(height)+"\" frameborder=\"0\" allow=\"autoplay; fullscreen\" allowfullscreen></iframe></center>"
return content
videoSite='https://media.ccc.de'
if '"'+videoSite in content:
url=content.split('"'+videoSite)[1]