diff options
author | James Taylor <user234683@users.noreply.github.com> | 2020-10-19 12:55:03 -0700 |
---|---|---|
committer | James Taylor <user234683@users.noreply.github.com> | 2020-10-19 12:55:03 -0700 |
commit | 75e8930958ea305a26a4652ef88639f7ad5db356 (patch) | |
tree | f92747b085110a05c11dafba66e012066d21659a /youtube/comments.py | |
parent | e3c311e10a54ae1b7d9114cc58de315157538e0f (diff) | |
download | yt-local-75e8930958ea305a26a4652ef88639f7ad5db356.tar.lz yt-local-75e8930958ea305a26a4652ef88639f7ad5db356.tar.xz yt-local-75e8930958ea305a26a4652ef88639f7ad5db356.zip |
yt_data_extract: normalize thumbnail and author urls
for instance, urls that start with // become https://
adjustment required in comments.py because the url was left as a
relative url in yt_data_extract by mistake and was using URL_ORIGIN
prefix as fix.
see #31
Diffstat (limited to 'youtube/comments.py')
-rw-r--r-- | youtube/comments.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/youtube/comments.py b/youtube/comments.py index a7a93cc..b3f1a90 100644 --- a/youtube/comments.py +++ b/youtube/comments.py @@ -90,7 +90,7 @@ def single_comment_ctoken(video_id, comment_id): def post_process_comments_info(comments_info): for comment in comments_info['comments']: comment['author_url'] = concat_or_none( - util.URL_ORIGIN, comment['author_url']) + '/', comment['author_url']) comment['author_avatar'] = concat_or_none( settings.img_prefix, comment['author_avatar']) |