ccc video site settings

main
Bob Mottram 2022-02-23 12:22:33 +00:00
parent 93d05bbdce
commit bb4bc52a69
1 changed files with 5 additions and 0 deletions

View File

@ -121,8 +121,13 @@ def _add_embedded_video_from_sites(translate: {}, content: str,
url = content.split('"' + video_site)[1] url = content.split('"' + video_site)[1]
if '"' in url: if '"' in url:
url = url.split('"')[0] url = url.split('"')[0]
video_site_settings = ''
if '#' in url:
video_site_settings = '#' + url.split('#', 1)[1]
url = url.split('#')[0]
if not url.endswith('/oembed'): if not url.endswith('/oembed'):
url = url + '/oembed' url = url + '/oembed'
url += video_site_settings
content += \ content += \
"<center>\n<iframe loading=\"lazy\" src=\"" + \ "<center>\n<iframe loading=\"lazy\" src=\"" + \
video_site + url + "\" width=\"" + \ video_site + url + "\" width=\"" + \