Fix comment count not extracted sometimes
YouTube created a new key 'commentCount' in addition to 'headerText'
This commit is contained in:
parent
5594d017e2
commit
83af4ab0d7
@ -357,7 +357,8 @@ def _extract_watch_info_mobile(top_level):
|
||||
# https://www.androidpolice.com/2019/10/31/google-youtube-app-comment-section-below-videos/
|
||||
# https://www.youtube.com/watch?v=bR5Q-wD-6qo
|
||||
if header_type == 'commentsEntryPointHeaderRenderer':
|
||||
comment_count_text = extract_str(comment_info.get('headerText'))
|
||||
comment_count_text = extract_str(multi_get(
|
||||
comment_info, 'commentCount', 'headerText'))
|
||||
else:
|
||||
comment_count_text = extract_str(deep_get(comment_info,
|
||||
'header', 'commentSectionHeaderRenderer', 'countText'))
|
||||
|
Loading…
x
Reference in New Issue
Block a user