Fix Error on videos with no likes/dislikes
Error 500 was displayed on some videos which had 0 likes or 0 dislikes, as the returned type was None. It was already treated but not used
This commit is contained in:
parent
9e7af17c73
commit
b84dc6dcc4
@ -43,7 +43,7 @@ def get_info(url):
|
||||
else:
|
||||
video['dislike_count'] = int(info['dislike_count'])
|
||||
|
||||
video['total_likes'] = info['dislike_count'] + info['like_count']
|
||||
video['total_likes'] = video['dislike_count'] + video['like_count']
|
||||
|
||||
video['average_rating'] = str(info['average_rating'])[0:4]
|
||||
video['formats'] = get_video_formats(info['formats'])
|
||||
|
Reference in New Issue
Block a user