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
This commit is contained in:
James Taylor
2020-10-19 12:55:03 -07:00
parent e3c311e10a
commit 75e8930958
3 changed files with 18 additions and 13 deletions

View File

@@ -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'])