Repository: yt-dlp/yt-dlp
File: yt_dlp/extractor/amadeustv.py (Python)

Code before:
            video_id, headers={'Referer': 'http://www.amadeus.tv/'})

        formats = []
        for video in traverse_obj(video_data, ('videoInfo', ('sourceVideo', ('transcodeList', ...)), {dict})):
            if not url_or_none(video.get('url')):
                continue
            formats.append({
                **traverse_obj(video, {
                    'url': 'url',
                    'format_id': ('definition', {lambda x: f'http-{x or "0"}'}),
                    'width': ('width', {int_or_none}),
                    'height': ('height', {int_or_none}),
                    'filesize': (('totalSize', 'size'), {int_or_none}),
                    'vcodec': ('videoStreamList', 0, 'codec'),
                    'acodec': ('audioStreamList', 0, 'codec'),
                    'fps': ('videoStreamList', 0, 'fps', {float_or_none}),
                }, get_all=False),
                'http_headers': {'Referer': 'http://www.amadeus.tv/'},
            })

        return {
            'id': video_id,
            'display_id': display_id,
            'formats': formats,
            **traverse_obj(video_data, {
                'title': ('videoInfo', 'basicInfo', 'name'),
                'thumbnail': ('coverInfo', 'coverUrl', {url_or_none}),
                'duration': ('videoInfo', 'sourceVideo', ('floatDuration', 'duration'), {float_or_none}),
            }, get_all=False),
            **traverse_obj(nuxt_data, ('item', {
                'title': (('title', 'title_en', 'title_cn'), {str}),
                'description': (('description', 'description_en', 'description_cn'), {str}),
                'timestamp': ('date', {parse_iso8601}),
                'view_count': ('view', {int_or_none}),
            }), get_all=False),
        }


Review comment (suggestion):
```suggestion
                'title': ('videoInfo', 'basicInfo', 'name', {str}),
```

Code after:
            video_id, headers={'Referer': 'http://www.amadeus.tv/'})

        formats = []
        for video in traverse_obj(video_data, ('videoInfo', ('sourceVideo', ('transcodeList', ...)), {dict})):
            if not url_or_none(video.get('url')):
                continue
            formats.append({
                **traverse_obj(video, {
                    'url': 'url',
                    'format_id': ('definition', {lambda x: f'http-{x or "0"}'}),
                    'width': ('width', {int_or_none}),
                    'height': ('height', {int_or_none}),
                    'filesize': (('totalSize', 'size'), {int_or_none}),
                    'vcodec': ('videoStreamList', 0, 'codec'),
                    'acodec': ('audioStreamList', 0, 'codec'),
                    'fps': ('videoStreamList', 0, 'fps', {float_or_none}),
                }, get_all=False),
                'http_headers': {'Referer': 'http://www.amadeus.tv/'},
            })

        return {
            'id': video_id,
            'display_id': display_id,
            'formats': formats,
            **traverse_obj(video_data, {
                'title': ('videoInfo', 'basicInfo', 'name', {str}),
                'thumbnail': ('coverInfo', 'coverUrl', {url_or_none}),
                'duration': ('videoInfo', 'sourceVideo', ('floatDuration', 'duration'), {float_or_none}),
            }, get_all=False),
            **traverse_obj(nuxt_data, ('item', {
                'title': (('title', 'title_en', 'title_cn'), {str}),
                'description': (('description', 'description_en', 'description_cn'), {str}),
                'timestamp': ('date', {parse_iso8601}),
                'view_count': ('view', {int_or_none}),
            }), get_all=False),
        }