Use extract_approx_int for comment likes

Full digits no longer available

Closes #64

Signed-off-by: Jesús <heckyel@hyperbola.info>
This commit is contained in:
James Taylor
2021-06-09 15:58:28 -07:00
committed by Jesús
parent 9077596979
commit a9edc54aac
3 changed files with 6 additions and 5 deletions

View File

@@ -284,8 +284,8 @@ def extract_comments_info(polymer_json):
comment_info['text'] = extract_formatted_text(comment_renderer.get('contentText'))
comment_info['time_published'] = extract_str(comment_renderer.get('publishedTimeText'))
comment_info['like_count'] = comment_renderer.get('likeCount')
liberal_update(comment_info, 'like_count',
extract_int(comment_renderer.get('voteCount')))
comment_info['approx_like_count'] = extract_approx_int(
comment_renderer.get('voteCount'))
liberal_update(comment_info, 'reply_count', comment_renderer.get('replyCount'))
info['comments'].append(comment_info)