From 73d1a8997710e002f67bc1aa91a40d16e6f4ac5f Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 1 Oct 2019 12:31:29 +0100 Subject: [PATCH] More than one invidious site --- webinterface.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/webinterface.py b/webinterface.py index 157fad0d3..4e41e760b 100644 --- a/webinterface.py +++ b/webinterface.py @@ -1519,13 +1519,14 @@ def addEmbeddedVideoFromSites(translate: {},content: str,width=400,height=300) - content=content+"
" 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+"
" - return content + invidiousSites=['https://invidio.us','axqzx4s6s54s32yentfqojs3x5i7faxza6xo3ehd4bzzsg2ii4fv2iid.onion'] + for videoSite in invidiousSites: + if '"'+videoSite in content: + url=content.split('"'+videoSite)[1] + if '"' in url: + url=url.split('"')[0].replace('/watch?v=','/embed/') + content=content+"
" + return content videoSite='https://media.ccc.de' if '"'+videoSite in content: