mirror of https://gitlab.com/bashrc2/epicyon
Check that media url is not just the site domain name
parent
f667c54050
commit
0a7656e549
|
@ -133,6 +133,8 @@ def _add_embedded_video_from_sites(translate: {}, content: str,
|
||||||
url += '?autoplay=0'
|
url += '?autoplay=0'
|
||||||
else:
|
else:
|
||||||
url = url.replace('?autoplay=1', '?autoplay=0')
|
url = url.replace('?autoplay=1', '?autoplay=0')
|
||||||
|
if not url:
|
||||||
|
continue
|
||||||
content += \
|
content += \
|
||||||
"<center>\n<span itemprop=\"video\">\n" + \
|
"<center>\n<span itemprop=\"video\">\n" + \
|
||||||
"<iframe loading=\"lazy\" " + \
|
"<iframe loading=\"lazy\" " + \
|
||||||
|
@ -211,6 +213,8 @@ def _add_embedded_video_from_sites(translate: {}, content: str,
|
||||||
if '"' not in url:
|
if '"' not in url:
|
||||||
continue
|
continue
|
||||||
url = url.split('"')[0]
|
url = url.split('"')[0]
|
||||||
|
if not url:
|
||||||
|
continue
|
||||||
if url.endswith('/trending') or \
|
if url.endswith('/trending') or \
|
||||||
url.endswith('/home') or \
|
url.endswith('/home') or \
|
||||||
url.endswith('/overview') or \
|
url.endswith('/overview') or \
|
||||||
|
|
Loading…
Reference in New Issue