Compare commits

...

2 Commits

Author SHA1 Message Date
sepro
c14e568f00
Update yt_dlp/extractor/amadeustv.py 2024-01-19 16:23:40 +01:00
sepro
8428aebccb
Apply suggestions from code review
Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
2024-01-19 16:22:56 +01:00

View File

@ -64,13 +64,13 @@ class AmadeusTVIE(InfoExtractor):
'display_id': display_id, 'display_id': display_id,
'formats': formats, 'formats': formats,
**traverse_obj(video_data, { **traverse_obj(video_data, {
'title': ('videoInfo', 'basicInfo', 'name'), 'title': ('videoInfo', 'basicInfo', 'name', {str}),
'thumbnail': ('coverInfo', 'coverUrl', {url_or_none}), 'thumbnail': ('coverInfo', 'coverUrl', {url_or_none}),
'duration': ('videoInfo', 'sourceVideo', ('floatDuration', 'duration'), {float_or_none}), 'duration': ('videoInfo', 'sourceVideo', ('floatDuration', 'duration'), {float_or_none}),
}, get_all=False), }, get_all=False),
**traverse_obj(nuxt_data, ('item', { **traverse_obj(nuxt_data, ('item', {
'title': (('title', 'title_en', 'title_cn'), ), 'title': (('title', 'title_en', 'title_cn'), {str}),
'description': (('description', 'description_en', 'description_cn'), ), 'description': (('description', 'description_en', 'description_cn'), {str}),
'timestamp': ('date', {parse_iso8601}), 'timestamp': ('date', {parse_iso8601}),
'view_count': ('view', {int_or_none}), 'view_count': ('view', {int_or_none}),
}), get_all=False), }), get_all=False),