Merge branch 'main' of ssh://code.freedombone.net:2222/bashrc/epicyon

merge-requests/30/head
Bob Mottram 2021-01-14 11:07:46 +00:00
commit 45b6d56bcd
2 changed files with 8 additions and 0 deletions

View File

@ -217,6 +217,10 @@ def getPersonBox(baseDir: str, session, wfRequest: {},
asHeader = {
'Accept': 'application/activity+json; profile="' + profileStr + '"'
}
if not wfRequest:
print('No webfinger given')
return None, None, None, None, None, None, None
if not wfRequest.get('errors'):
personUrl = getUserUrl(wfRequest, sourceId)
else:

View File

@ -53,6 +53,8 @@ def _addEmbeddedVideoFromSites(translate: {}, content: str,
url = url.split('"')[0].replace('/watch?v=', '/embed/')
if '&' in url:
url = url.split('&')[0]
if '?utm_' in url:
url = url.split('?utm_')[0]
content = \
content + "<center>\n<iframe loading=\"lazy\" src=\"" + \
videoSite + url + "\" width=\"" + str(width) + \
@ -80,6 +82,8 @@ def _addEmbeddedVideoFromSites(translate: {}, content: str,
url = url.split('"')[0].replace('/watch?v=', '/embed/')
if '&' in url:
url = url.split('&')[0]
if '?utm_' in url:
url = url.split('?utm_')[0]
content = \
content + "<center>\n<iframe loading=\"lazy\" src=\"" + \
videoSite + url + "\" width=\"" + \