mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-10 03:10:38 +00:00
[youtube] Fix for empty comment text (Closes #97)
This commit is contained in:
parent
f983b87567
commit
ba7bf12d89
@ -2078,7 +2078,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
|||||||
comment = meta_comment['commentThreadRenderer']['comment']['commentRenderer']
|
comment = meta_comment['commentThreadRenderer']['comment']['commentRenderer']
|
||||||
video_comments.append({
|
video_comments.append({
|
||||||
'id': comment['commentId'],
|
'id': comment['commentId'],
|
||||||
'text': ''.join([c['text'] for c in comment['contentText']['runs']]),
|
'text': ''.join([c['text'] for c in try_get(comment, lambda x: x['contentText']['runs'], list) or []]),
|
||||||
'time_text': ''.join([c['text'] for c in comment['publishedTimeText']['runs']]),
|
'time_text': ''.join([c['text'] for c in comment['publishedTimeText']['runs']]),
|
||||||
'author': comment.get('authorText', {}).get('simpleText', ''),
|
'author': comment.get('authorText', {}).get('simpleText', ''),
|
||||||
'votes': comment.get('voteCount', {}).get('simpleText', '0'),
|
'votes': comment.get('voteCount', {}).get('simpleText', '0'),
|
||||||
|
Loading…
Reference in New Issue
Block a user