fix real extractor

This commit is contained in:
Sakura286 2024-09-10 00:50:19 +08:00
parent 07884e733b
commit 27918ed1da

View File

@ -151,20 +151,21 @@ class MixchMovieIE(InfoExtractor):
'id': video_id,
'formats': [{
'format_id': 'mp4',
'url': traverse_obj(data, ('movie', 'file'), {url_or_none}),
'url': data['movie']['file'],
'ext': 'mp4',
}],
**traverse_obj(data, {
'title': ('movie', 'title', {str_or_none}),
'title': ('movie', 'title', {str}),
'thumbnail': ('movie', 'thumbnailURL', {url_or_none}),
'uploader': ('ownerInfo', 'name', {str_or_none}),
'uploader': ('ownerInfo', 'name', {str}),
'uploader_id': ('ownerInfo', 'id', {int_or_none}),
'channel_follower_count': ('ownerInfo', 'fan', {int_or_none}),
'view_count': ('ownerInfo', 'view', {int_or_none}),
'like_count': ('movie', 'favCount', {int_or_none}),
'comment_count': ('movie', 'commentCount', {int_or_none}),
}),
'uploader_url': 'https://mixch.tv/u/' + traverse_obj(data, ('ownerInfo', 'id', {str_or_none})),
'timestamp': ('movie', 'published', {int_or_none}),
'uploader_url': ('ownerInfo', 'id', {lambda x: x and f'https://mixch.tv/u/{x}'}),
'live_status': 'not_live',
'__post_extractor': self.extract_comments(video_id),
}