mirror of https://gitlab.com/bashrc2/epicyon
Remove tracking extensions from youtube urls
parent
6b1991d472
commit
30918e6b1d
|
@ -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