diff options
author | James Taylor <user234683@users.noreply.github.com> | 2019-09-08 17:20:02 -0700 |
---|---|---|
committer | James Taylor <user234683@users.noreply.github.com> | 2019-09-08 17:20:02 -0700 |
commit | fb1a3531c59f5d9cee406295bbe006730695c249 (patch) | |
tree | 90423096184d7632b6271dfe3ca6375198bf8d8c /youtube/channel.py | |
parent | 1b6fb4e100a2aed8c9c391e100fbbe60ac74d352 (diff) | |
download | yt-local-fb1a3531c59f5d9cee406295bbe006730695c249.tar.lz yt-local-fb1a3531c59f5d9cee406295bbe006730695c249.tar.xz yt-local-fb1a3531c59f5d9cee406295bbe006730695c249.zip |
Extraction: Fix url prefixing
Diffstat (limited to 'youtube/channel.py')
-rw-r--r-- | youtube/channel.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/youtube/channel.py b/youtube/channel.py index de75eaa..79b7c9b 100644 --- a/youtube/channel.py +++ b/youtube/channel.py @@ -219,8 +219,7 @@ def extract_info(polymer_json, tab): else: items = contents # for search - # TODO: Fix this URL prefixing shit - additional_info = {'author': info['channel_name'], 'author_url': '/channel/' + channel_id} + additional_info = {'author': info['channel_name'], 'author_url': 'https://www.youtube.com/channel/' + channel_id} info['items'] = [yt_data_extract.renderer_info(renderer, additional_info) for renderer in items] elif tab == 'about': @@ -258,8 +257,8 @@ def extract_info(polymer_json, tab): return info def post_process_channel_info(info): - info['avatar'] = '/' + info['avatar'] - info['channel_url'] = '/' + info['channel_url'] + info['avatar'] = util.prefix_url(info['avatar']) + info['channel_url'] = util.prefix_url(info['channel_url']) for item in info['items']: yt_data_extract.prefix_urls(item) yt_data_extract.add_extra_html_info(item) |