mirror of https://gitlab.com/bashrc2/epicyon
Embedded youtube video
parent
0bc49a476b
commit
99bb7b867f
|
@ -190,11 +190,16 @@ def html_podcast_episode(css_cache: {}, translate: {},
|
||||||
translate['Your browser does not support the audio element.'] + \
|
translate['Your browser does not support the audio element.'] + \
|
||||||
'\n </audio>\n'
|
'\n </audio>\n'
|
||||||
elif podcast_properties.get('linkMimeType'):
|
elif podcast_properties.get('linkMimeType'):
|
||||||
if '/youtube' in podcast_properties['linkMimeType'] or \
|
if '/youtube' in podcast_properties['linkMimeType']:
|
||||||
'/vimeo' in podcast_properties['linkMimeType']:
|
video_site = 'https://www.youtube.com'
|
||||||
|
url = link_url.replace('/watch?v=', '/embed/')
|
||||||
|
if '&' in url:
|
||||||
|
url = url.split('&')[0]
|
||||||
|
if '?utm_' in url:
|
||||||
|
url = url.split('?utm_')[0]
|
||||||
podcast_str += \
|
podcast_str += \
|
||||||
" <iframe loading=\"lazy\" src=\"" + \
|
" <iframe loading=\"lazy\" src=\"" + \
|
||||||
link_url + "\" width=\"90%\" " + \
|
video_site + url + "\" width=\"90%\" " + \
|
||||||
"frameborder=\"0\" allow=\"autoplay; fullscreen\" " + \
|
"frameborder=\"0\" allow=\"autoplay; fullscreen\" " + \
|
||||||
"allowfullscreen>\n </iframe>\n"
|
"allowfullscreen>\n </iframe>\n"
|
||||||
elif 'video' in podcast_properties['linkMimeType']:
|
elif 'video' in podcast_properties['linkMimeType']:
|
||||||
|
|
Loading…
Reference in New Issue