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

Code before:
            'uploader_id': 'NewsflareBreaking',
            'channel_url': 'https://www.youtube.com/channel/UCzSSoloGEz10HALUAbYhngQ',
            'description': 'md5:99b21d9cea59330149efbd9706e208f5',
            'age_limit': 0,
            'channel_id': 'UCzSSoloGEz10HALUAbYhngQ',
            'uploader_url': 'http://www.youtube.com/user/NewsflareBreaking',
            'view_count': int,
            'categories': ['News & Politics'],
            'live_status': 'not_live',
            'playable_in_embed': True,
            'channel': 'Newsflare',
            'duration': 37,
            'upload_date': '20180511',
        }
    }]

    def _get_formats_and_subtitle(self, json_data, video_id):
        formats, subtitles = [], {}
        for source in traverse_obj(json_data, 'sources', 'sources_desktop', ...):
            ext = determine_ext(source.get('src'))
            if ext == 'm3u8':
                fmts, subs = self._extract_m3u8_formats_and_subtitles(source.get('src'), video_id)
                formats.extend(fmts)
                self._merge_subtitles(subs, target=subtitles)
            else:
                formats.append({'url': source.get('src'), 'ext': 'mp4'})
        return formats, subtitles

    def _real_extract(self, url):
        display_id = self._match_id(url)
        webpage = self._download_webpage(url, display_id)

        nextjs_json = self._search_nextjs_data(webpage, display_id)['props']['pageProps']['initialState']['videos'][display_id]
        if nextjs_json.get('youtube_id'):
            return self.url_result(
                f'https://www.youtube.com/watch?v={nextjs_json.get("youtube_id")}', YoutubeIE)
        formats, subtitles = self._get_formats_and_subtitle(nextjs_json, display_id)

        return {
            'id': display_id,
            'title': nextjs_json.get('title') or self._html_search_meta('og:title', webpage),
            'formats': formats,
            'subtitles': subtitles,
            'description': nextjs_json.get('description') if nextjs_json.get('description') else None,
            'duration': int_or_none(nextjs_json.get('duration')),
            'thumbnails': [{'url': thumbnail} for thumbnail in nextjs_json.get('default_thumbnails')],
            'channel_id': nextjs_json.get('channel') or nextjs_json.get('channel_slug'),
            'timestamp': parse_iso8601(nextjs_json.get('created')),
            'release_timestamp': parse_iso8601(nextjs_json.get('published')),
            'view_count': int_or_none(nextjs_json.get('views')),
        }

Review comment (suggestion):
Not this?
```suggestion
                formats.append({'url': source.get('src'), 'ext': ext})
```

Code after:
            'channel_follower_count': int,
            'like_count': int,
            'uploader': 'Newsflare',
            'thumbnail': 'https://i.ytimg.com/vi_webp/2ZTqmpee-bQ/maxresdefault.webp',
            'availability': 'public',
            'title': 'Geese Chase Alligator Across Golf Course',
            'uploader_id': 'NewsflareBreaking',
            'channel_url': 'https://www.youtube.com/channel/UCzSSoloGEz10HALUAbYhngQ',
            'description': 'md5:99b21d9cea59330149efbd9706e208f5',
            'age_limit': 0,
            'channel_id': 'UCzSSoloGEz10HALUAbYhngQ',
            'uploader_url': 'http://www.youtube.com/user/NewsflareBreaking',
            'view_count': int,
            'categories': ['News & Politics'],
            'live_status': 'not_live',
            'playable_in_embed': True,
            'channel': 'Newsflare',
            'duration': 37,
            'upload_date': '20180511',
        }
    }]

    def _get_formats_and_subtitle(self, json_data, video_id):
        formats, subtitles = [], {}
        for source in traverse_obj(json_data, 'sources', 'sources_desktop', ...):
            ext = determine_ext(source.get('src'), mimetype2ext(source.get('type')))
            if ext == 'm3u8':
                fmts, subs = self._extract_m3u8_formats_and_subtitles(source.get('src'), video_id)
                formats.extend(fmts)
                self._merge_subtitles(subs, target=subtitles)
            else:
                formats.append({'url': source.get('src'), 'ext': ext})
        return formats, subtitles

    def _real_extract(self, url):
        display_id = self._match_id(url)
        webpage = self._download_webpage(url, display_id)

        nextjs_json = self._search_nextjs_data(webpage, display_id)['props']['pageProps']['initialState']['videos'][display_id]
        if nextjs_json.get('youtube_id'):
            return self.url_result(
                f'https://www.youtube.com/watch?v={nextjs_json.get("youtube_id")}', YoutubeIE)

        formats, subtitles = self._get_formats_and_subtitle(nextjs_json, display_id)
        return {
            'id': display_id,
            'title': nextjs_json.get('title') or self._html_search_meta('og:title', webpage),
            'formats': formats,
            'subtitles': subtitles,
            'description': nextjs_json.get('description') or None,
            'duration': int_or_none(nextjs_json.get('duration')),