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

Code before:
            note='Downloading player metadata', fatal=False,
            headers={'Accept': 'application/vnd.art19.v0+json'})
        rss_metadata = self._download_json(
            f'https://rss.art19.com/episodes/{episode_id}.json', episode_id, fatal=False,
            note='Downloading RSS metadata')

        formats = []
        for fmt_id, fmt_data in traverse_obj(rss_metadata, ('content', 'media', {dict.items}, ...)):
            if fmt_id == 'waveform_bin':
                continue
            fmt_url = traverse_obj(fmt_data, ('url', {url_or_none}))
            if not fmt_url:
                continue
            formats.append({
                'format_id': fmt_id,
                'url': fmt_url,
                'vcodec': 'none',
                'acodec': fmt_id,
                'quality': -2 if fmt_id == 'ogg' else -1,
            })
        formats.append({
            'format_id': 'direct',
            'url': f'https://rss.art19.com/episodes/{episode_id}.mp3',
            'vcodec': 'none',
            'acodec': 'mp3',
        })

        return {
            'id': episode_id,
            'formats': formats,
            **traverse_obj(player_metadata, ('episode', {
                'title': ('title', {str}),
                'description': ('description_plain', {str}),
                'episode_id': ('id', {str}),
                'episode_number': ('episode_number', {int_or_none}),
                'season_id': ('season_id', {str}),
                'series_id': ('series_id', {str}),
                'timestamp': ('created_at', {parse_iso8601}),
                'release_timestamp': ('released_at', {parse_iso8601}),
                'modified_timestamp': ('updated_at', {parse_iso8601})
            })),
            **traverse_obj(rss_metadata, ('content', {
                'title': ('episode_title', {str}),
                'description': ('episode_description_plain', {str}),
                'episode_id': ('episode_id', {str}),
                'episode_number': ('episode_number', {int_or_none}),
                'season': ('season_title', {str}),
                'season_id': ('season_id', {str}),
                'season_number': ('season_number', {int_or_none}),
                'series': ('series_title', {str}),
                'series_id': ('series_id', {str}),

Review comment (suggestion):
```suggestion
        formats = [{
            'format_id': 'direct',
            'url': f'https://rss.art19.com/episodes/{episode_id}.mp3',
            'vcodec': 'none',
            'acodec': 'mp3',
        }]
        for fmt_id, fmt_data in traverse_obj(rss_metadata, ('content', 'media', {dict.items}, ...)):
            if fmt_id == 'waveform_bin':
                continue
            fmt_url = traverse_obj(fmt_data, ('url', {url_or_none}))
            if not fmt_url:
                continue
            formats.append({
                'format_id': fmt_id,
                'url': fmt_url,
                'vcodec': 'none',
                'acodec': fmt_id,
                'quality': -2 if fmt_id == 'ogg' else -1,
            })
```

Code after:
            note='Downloading player metadata', fatal=False,
            headers={'Accept': 'application/vnd.art19.v0+json'})
        rss_metadata = self._download_json(
            f'https://rss.art19.com/episodes/{episode_id}.json', episode_id, fatal=False,
            note='Downloading RSS metadata')

        formats = [{
            'format_id': 'direct',
            'url': f'https://rss.art19.com/episodes/{episode_id}.mp3',
            'vcodec': 'none',
            'acodec': 'mp3',
        }]
        for fmt_id, fmt_data in traverse_obj(rss_metadata, ('content', 'media', {dict.items}, ...)):
            if fmt_id == 'waveform_bin':
                continue
            fmt_url = traverse_obj(fmt_data, ('url', {url_or_none}))
            if not fmt_url:
                continue
            formats.append({
                'format_id': fmt_id,
                'url': fmt_url,
                'vcodec': 'none',
                'acodec': fmt_id,
                'quality': -2 if fmt_id == 'ogg' else -1,
            })

        return {
            'id': episode_id,
            'formats': formats,
            **traverse_obj(player_metadata, ('episode', {
                'title': ('title', {str}),
                'description': ('description_plain', {str}),
                'episode_id': ('id', {str}),
                'episode_number': ('episode_number', {int_or_none}),
                'season_id': ('season_id', {str}),
                'series_id': ('series_id', {str}),
                'timestamp': ('created_at', {parse_iso8601}),
                'release_timestamp': ('released_at', {parse_iso8601}),
                'modified_timestamp': ('updated_at', {parse_iso8601})
            })),
            **traverse_obj(rss_metadata, ('content', {
                'title': ('episode_title', {str}),
                'description': ('episode_description_plain', {str}),
                'episode_id': ('episode_id', {str}),
                'episode_number': ('episode_number', {int_or_none}),
                'season': ('season_title', {str}),
                'season_id': ('season_id', {str}),
                'season_number': ('season_number', {int_or_none}),
                'series': ('series_title', {str}),
                'series_id': ('series_id', {str}),
                'thumbnail': ('cover_image', {url_or_none}),