Fix exception when video comments disabled and blank comments info
e.g. happens on vid where comments are disabled if comments disabled in settings since the comments info object is just {} Signed-off-by: Jesús <heckyel@hyperbola.info>
This commit is contained in:
parent
ce146b32b1
commit
e41180058f
@ -458,7 +458,7 @@ def get_watch_page(video_id=None):
|
|||||||
# Check for false determination of disabled comments, which comes from
|
# Check for false determination of disabled comments, which comes from
|
||||||
# the watch page. But if we got comments in the separate request for those,
|
# the watch page. But if we got comments in the separate request for those,
|
||||||
# then the determination is wrong.
|
# then the determination is wrong.
|
||||||
if info['comments_disabled'] and len(comments_info['comments']) != 0:
|
if info['comments_disabled'] and comments_info.get('comments'):
|
||||||
info['comments_disabled'] = False
|
info['comments_disabled'] = False
|
||||||
print('Warning: False determination that comments are disabled')
|
print('Warning: False determination that comments are disabled')
|
||||||
print('Comment count:', info['comment_count'])
|
print('Comment count:', info['comment_count'])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user