mirror of https://gitlab.com/bashrc2/epicyon
Merge branch 'main' of ssh://code.freedombone.net:2222/bashrc/epicyon
commit
45b6d56bcd
4
posts.py
4
posts.py
|
@ -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:
|
||||
|
|
|
@ -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=\"" + \
|
||||
|
|
Loading…
Reference in New Issue