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

Code before:
        data = self._download_json(
            f'https://arhiiv.err.ee/api/v1/content/video/{video_id}', video_id)

        formats, subtitles = [], {}
        media_data = traverse_obj(data, ('media', 'src'), {url_or_none})
        if 'hls' in media_data:
            fmts, subs = self._extract_m3u8_formats_and_subtitles(
                media_data['hls'], video_id, 'mp4', m3u8_id='hls', fatal=False)
            formats.extend(fmts)
            self._merge_subtitles(subs, target=subtitles)
        if 'dash' in media_data:
            fmts, subs = self._extract_mpd_formats_and_subtitles(
                media_data['dash'], video_id, mpd_id='dash', fatal=False)
            formats.extend(fmts)
            self._merge_subtitles(subs, target=subtitles)

        return {
            'id': video_id,
            'formats': formats,
            'subtitles': subtitles,
            **traverse_obj(data['info'], {
                'title': ('title', {str}),
                'series': ('seriesTitle', {str}),
                'series_id': ('seriesId', {str}),
                'episode_id': ('episode', {int_or_none}),
                'description': ('synopsis', {str}),
                'timestamp': ('date', {parse_iso8601}),
                'modified_timestamp': ('dateModified', {parse_iso8601}),
                'release_timestamp': ('uploadDate', {parse_iso8601}),
                'release_year': ('year', {int_or_none}),
            }, get_all=False),
        }


Review comment (suggestion):
```suggestion
                'series': ('seriesTitle', {str}, filter),
                'series_id': ('seriesId', {str}, filter),
                'episode_id': ('episode', {int_or_none}),
                'description': ('synopsis', {str}, filter),
```

Code after:
        formats, subtitles = [], {}
        if hls_url := traverse_obj(data, ('media', 'src', 'hls', {url_or_none})):
            fmts, subs = self._extract_m3u8_formats_and_subtitles(
                hls_url, video_id, 'mp4', m3u8_id='hls', fatal=False)
            formats.extend(fmts)
            self._merge_subtitles(subs, target=subtitles)
        if dash_url := traverse_obj(data, ('media', 'src', 'dash', {url_or_none})):
            fmts, subs = self._extract_mpd_formats_and_subtitles(
                dash_url, video_id, mpd_id='dash', fatal=False)
            formats.extend(fmts)
            self._merge_subtitles(subs, target=subtitles)

        return {
            'id': video_id,
            'formats': formats,
            'subtitles': subtitles,
            **traverse_obj(data, ('info', {
                'title': ('title', {str}),
                'series': ('seriesTitle', {str}, filter),
                'series_id': ('seriesId', {str}, filter),
                'episode_id': ('episode', {int_or_none}),
                'description': ('synopsis', {str}, filter),
                'timestamp': ('uploadDate', {parse_iso8601}),
                'modified_timestamp': ('dateModified', {parse_iso8601}),
                'release_timestamp': ('date', {parse_iso8601}),
                'release_year': ('year', {int_or_none}),
            })),
        }