mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-06-08 06:18:52 +02:00
fix typo in previous patch, like count, and use direct dict access
This commit is contained in:
parent
ee81ca4a95
commit
16cb4fedbe
|
@ -3313,16 +3313,16 @@ def _extract_comment(self, view_model, entity, parent=None):
|
|||
|
||||
info = {
|
||||
'id': comment_id,
|
||||
'text': self._get_text(entity_payload, ('properties', 'content', 'contetn')),
|
||||
'like_count': self._get_count(entity_payload, ('toolbar', 'likeCountNotliked')),
|
||||
'text': entity_payload['properties']['content']['content'],
|
||||
'like_count': entity_payload['toolbar']['likeCountLiked'],
|
||||
'author_id': traverse_obj(entity_payload, ('author', 'channelId', {self.ucid_or_none})),
|
||||
'author': self._get_text(entity_payload, ('author', 'displayName')),
|
||||
'author': entity_payload['author']['displayName'],
|
||||
'author_thumbnail': traverse_obj(entity_payload, ('author', 'avatarThumbnailUrl', {url_or_none})),
|
||||
'parent': parent or 'root',
|
||||
}
|
||||
|
||||
# Timestamp is an estimate calculated from the current time and time_text
|
||||
time_text = self._get_text(entity_payload, ('properties', 'publishedTime')) or ''
|
||||
time_text = entity_payload['properties']['publishedTime'] or ''
|
||||
timestamp = self._parse_time_text(time_text)
|
||||
|
||||
info.update({
|
||||
|
|
Loading…
Reference in New Issue
Block a user