aboutsummaryrefslogtreecommitdiffstats
path: root/youtube/channel.py
diff options
context:
space:
mode:
authorJames Taylor <user234683@users.noreply.github.com>2021-08-08 20:29:42 -0700
committerJesús <heckyel@hyperbola.info>2021-08-09 12:27:49 -0500
commit6c6c469fbd4277d80b3309b796466c32ec19a0d0 (patch)
treec65314b3680b62c8e4c2d482b027b9900b3d042b /youtube/channel.py
parent2039972ab32ac7d7ceb6be811a7d7d9019377b2c (diff)
downloadyt-local-6c6c469fbd4277d80b3309b796466c32ec19a0d0.tar.lz
yt-local-6c6c469fbd4277d80b3309b796466c32ec19a0d0.tar.xz
yt-local-6c6c469fbd4277d80b3309b796466c32ec19a0d0.zip
Prefix youtube URLs in video descriptions and channel about page
Closes #75 Signed-off-by: Jesús <heckyel@hyperbola.info>
Diffstat (limited to 'youtube/channel.py')
-rw-r--r--youtube/channel.py4
1 files changed, 4 insertions, 0 deletions
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):