mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-09-27 21:27:54 +00:00
comments: filter out invalid fields; only timestamp should be integer
"{str_or_none}" vs. "{str}" Co-authored-by: pukkandan <pukkandan.ytdlp@gmail.com>
This commit is contained in:
parent
074e96c746
commit
5bbd6c18b8
|
@ -64,11 +64,11 @@ def _get_comments(self, video_id):
|
|||
yield from traverse_obj(self._download_json(
|
||||
f'https://mixch.tv/api-web/lives/{video_id}/messages', video_id,
|
||||
note='Downloading comments', errnote='Failed to download comments'), (..., {
|
||||
'author': ('name', {str_or_none}),
|
||||
'author_id': ('user_id', {int_or_none}),
|
||||
'id': ('message_id', {str_or_none}),
|
||||
'text': ('body', {str_or_none}),
|
||||
'timestamp': ('created', {int_or_none}),
|
||||
'author': ('name', {str}),
|
||||
'author_id': ('user_id', {str_or_none}),
|
||||
'id': ('message_id', {str}, {lambda x: x or None}),
|
||||
'text': ('body', {str}),
|
||||
'timestamp': ('created', {int}),
|
||||
}))
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue