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

Code before:
        'params': {'skip_download': 'm3u8'},
    }, {
        'url': 'http://www.1tv.ru/shows/tochvtoch-supersezon/vystupleniya/evgeniy-dyatlov-vladimir-vysockiy-koni-priveredlivye-toch-v-toch-supersezon-fragment-vypuska-ot-06-11-2016',
        'only_matching': True,
    }, {
        'url': 'https://www.sport1tv.ru/sport/chempionat-rossii-po-figurnomu-kataniyu-2025',
        'only_matching': True,
    }]

    def _entries(self, items):
        for item in items:
            video_id = str(item.get('id') or item['uid'])

            formats, subtitles = [], {}
            for f in traverse_obj(item, ('sources', lambda _, v: url_or_none(v['src']))):
                src = f['src']
                ext = mimetype2ext(f.get('type'), default=determine_ext(src))
                if ext == 'm3u8':
                    fmts, subs = self._extract_m3u8_formats_and_subtitles(
                        src, video_id, 'mp4', m3u8_id='hls', fatal=False)
                elif ext == 'mpd':
                    fmts, subs = self._extract_mpd_formats_and_subtitles(
                        src, video_id, mpd_id='dash', fatal=False)
                else:
                    tbr = int_or_none(self._search_regex(
                        fr'_(\d{{3,}})\.{ext}', src, 'tbr', default=None))
                    formats.append({
                        'url': src,
                        'format_id': join_nonempty('http', ext, tbr),
                        'tbr': tbr,
                        # quality metadata of http formats may be incorrect
                        'quality': -10,
                    })
                    continue
                formats.extend(fmts)
                self._merge_subtitles(subs, target=subtitles)

            yield {
                **traverse_obj(item, {
                    'title': ('title', {str}),
                    'thumbnail': ('poster', {url_or_none}),
                    'timestamp': ('dvr_begin_at', {int_or_none}),
                    'upload_date': ('date_air', {unified_strdate}),
                    'duration': ('duration', {int_or_none}),
                }),
                'id': video_id,
                'formats': formats,
                'subtitles': subtitles,
            }

    def _real_extract(self, url):

Review comment (suggestion):
```suggestion
                    tbr = self._search_regex(fr'_(\d{{3,}})\.{ext}', src, 'tbr', default=None)
```

Code after:
        'params': {'skip_download': 'm3u8'},
    }, {
        'url': 'http://www.1tv.ru/shows/tochvtoch-supersezon/vystupleniya/evgeniy-dyatlov-vladimir-vysockiy-koni-priveredlivye-toch-v-toch-supersezon-fragment-vypuska-ot-06-11-2016',
        'only_matching': True,
    }, {
        'url': 'https://www.sport1tv.ru/sport/chempionat-rossii-po-figurnomu-kataniyu-2025',
        'only_matching': True,
    }]

    def _entries(self, items):
        for item in items:
            video_id = str(item.get('id') or item['uid'])

            formats, subtitles = [], {}
            for f in traverse_obj(item, ('sources', lambda _, v: url_or_none(v['src']))):
                src = f['src']
                ext = mimetype2ext(f.get('type'), default=determine_ext(src))
                if ext == 'm3u8':
                    fmts, subs = self._extract_m3u8_formats_and_subtitles(
                        src, video_id, 'mp4', m3u8_id='hls', fatal=False)
                elif ext == 'mpd':
                    fmts, subs = self._extract_mpd_formats_and_subtitles(
                        src, video_id, mpd_id='dash', fatal=False)
                else:
                    tbr = self._search_regex(fr'_(\d{{3,}})\.{ext}', src, 'tbr', default=None)
                    formats.append({
                        'url': src,
                        'ext': ext,
                        'format_id': join_nonempty('http', ext, tbr),
                        'tbr': int_or_none(tbr),
                        # quality metadata of http formats may be incorrect
                        'quality': -10,
                    })
                    continue
                formats.extend(fmts)
                self._merge_subtitles(subs, target=subtitles)

            yield {
                **traverse_obj(item, {
                    'title': ('title', {str}),
                    'thumbnail': ('poster', {url_or_none}),
                    'timestamp': ('dvr_begin_at', {int_or_none}),
                    'upload_date': ('date_air', {unified_strdate}),
                    'duration': ('duration', {int_or_none}),
                }),
                'id': video_id,
                'formats': formats,
                'subtitles': subtitles,
            }

    def _real_extract(self, url):