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

@@ -118,10 +118,11 @@ def post_process_comments_info(comments_info):
else:
comment['view_replies_text'] = str(reply_count) + ' replies'
if comment['like_count'] == 1:
if comment['approx_like_count'] == '1':
comment['likes_text'] = '1 like'
else:
comment['likes_text'] = str(comment['like_count']) + ' likes'
comment['likes_text'] = (str(comment['approx_like_count'])
+ ' likes')
comments_info['include_avatars'] = settings.enable_comment_avatars
if comments_info['ctoken']: