Prefix youtube URLs in video descriptions and channel about page

Closes #75

Signed-off-by: Jesús <heckyel@hyperbola.info>
This commit is contained in:
James Taylor
2021-08-08 20:29:42 -07:00
committed by Jesús
parent 2039972ab3
commit 6c6c469fbd
3 changed files with 26 additions and 0 deletions

View File

@@ -231,6 +231,10 @@ def post_process_channel_info(info):
for item in info['items']:
util.prefix_urls(item)
util.add_extra_html_info(item)
if info['current_tab'] == 'about':
for i, (text, url) in enumerate(info['links']):
if util.YOUTUBE_URL_RE.fullmatch(url):
info['links'][i] = (text, util.prefix_url(url))
def get_channel_first_page(base_url=None, channel_id=None):