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

Code before:
        formats = []
        for source in traverse_obj(player, ('tracks', ..., lambda _, v: url_or_none(v['src']))):
            src_url = source['src']
            ext = mimetype2ext(source.get('type'))
            if ext == 'm3u8':
                fmts = self._extract_m3u8_formats(
                    src_url, video_id, 'mp4', m3u8_id='hls', fatal=False)
            elif ext == 'mpd':
                fmts = self._extract_mpd_formats(
                    src_url, video_id, mpd_id='dash', fatal=False)
            else:
                self.report_warning(f'Unsupported stream type: {ext}')
                continue
            formats.extend(fmts)

        return {
            'id': video_id,
            'description': clean_html(self._search_regex(
                r'<p\s+class="">(.+)</p>', webpage, 'description', default='')),
            'formats': formats,
            **traverse_obj(webpage, {
                'title': ({find_element(tag='h2')}, {clean_html}),
                'release_date': (
                    {clean_html}, {re.compile(r'Premiéra:\s*(\d{1,2}\.\d{1,2}\.\d{4})').findall},
                    ..., {str}, filter, {unified_strdate}, any,
                ),
                'series': ({find_element(tag='h1')}, {clean_html}),
                'thumbnail': (
                    {find_element(id='player-live', html=True)}, {extract_attributes},
                    'poster', {urljoin('https://www.tvnoe.cz/')}),
            }),
        }


Review comment (suggestion):
`filter` is unnecessary here, right? and hanging parentheses are typically avoided per convention (with the common exceptions being tuple vars and `if`/`for` clauses)
```suggestion
                'release_date': (
                    {clean_html}, {re.compile(r'Premiéra:\s*(\d{1,2}\.\d{1,2}\.\d{4})').findall},
                    ..., {str}, {unified_strdate}, any),
```

Code after:
        formats = []
        for source in traverse_obj(player, ('tracks', ..., lambda _, v: url_or_none(v['src']))):
            src_url = source['src']
            ext = mimetype2ext(source.get('type'))
            if ext == 'm3u8':
                fmts = self._extract_m3u8_formats(
                    src_url, video_id, 'mp4', m3u8_id='hls', fatal=False)
            elif ext == 'mpd':
                fmts = self._extract_mpd_formats(
                    src_url, video_id, mpd_id='dash', fatal=False)
            else:
                self.report_warning(f'Unsupported stream type: {ext}')
                continue
            formats.extend(fmts)

        return {
            'id': video_id,
            'description': clean_html(self._search_regex(
                r'<p\s+class="">(.+?)</p>', webpage, 'description', default=None)),
            'formats': formats,
            **traverse_obj(webpage, {
                'title': ({find_element(tag='h2')}, {clean_html}),
                'release_date': (
                    {clean_html}, {re.compile(r'Premiéra:\s*(\d{1,2}\.\d{1,2}\.\d{4})').findall},
                    ..., {str}, {unified_strdate}, any),
                'series': ({find_element(tag='h1')}, {clean_html}),
                'thumbnail': (
                    {find_element(id='player-live', html=True)}, {extract_attributes},
                    'poster', {urljoin('https://www.tvnoe.cz/')}),
            }),
        }