From 6c6c469fbd4277d80b3309b796466c32ec19a0d0 Mon Sep 17 00:00:00 2001 From: James Taylor Date: Sun, 8 Aug 2021 20:29:42 -0700 Subject: Prefix youtube URLs in video descriptions and channel about page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #75 Signed-off-by: Jesús --- youtube/channel.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'youtube/channel.py') diff --git a/youtube/channel.py b/youtube/channel.py index 69092d3..4393076 100644 --- a/youtube/channel.py +++ b/youtube/channel.py @@ -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): -- cgit v1.2.3