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

Code before:
        video_id = self._match_id(url)
        metadata = self._download_json(self._API_TMPL.format(video_id), video_id)

        formats, subtitles = [], {}
        video_data = traverse_obj(metadata, ('details', 'video'))
        for item in video_data:
            vurl = item.get('url')
            if not vurl:
                continue
            ext = determine_ext(vurl)
            if ext == 'm3u8':
                formats, subtitles = self._extract_m3u8_formats_and_subtitles(vurl, video_id)
                formats.extend(formats)
            elif ext == 'mpd':
                formats, subtitles = self._extract_mpd_formats_and_subtitles(vurl, video_id)
                subtitles.utend(formats)
                subtitles.update(subtitles)
            else:
                continue

        thumbnails = []
        if thumb_data := traverse_obj(metadata, ('thumbs'), ('thumbnails'), default=None):
            for _, thumb_url in thumb_data.items():
                if thumb_url is None:
                    continue
                thumbnails.append({'url': thumb_url})

        return {
            'id': video_id,
            **traverse_obj(metadata, ({
                'title': ('title'),
                'description': ('description'),
                'duration': ('duration'),
            })),
            'thumbnails': thumbnails,
            'formats': formats,
            'subtitles': self._merge_subtitles(subtitles),
        }


class TheChosenGroupIE(FrontroGroupBaseIE):
    _WORKING = False
    _CHANNEL_ID = '12884901895'
    _VIDEO_EXTRACTOR = TheChosenIE
    _VIDEO_URL_TMPL = 'https://watch.thechosen.tv/watch/%s'

    _VALID_URL = r'https?://(?:www\.)?watch\.thechosen\.tv/group/(?P<id>[0-9]+)'
    _TESTS = [{
        'url': 'https://watch.thechosen.tv/group/309237658592',
        'info_dict': {
            'id': '309237658592',

Review comment (suggestion):
could we do this?
```suggestion
        for thumb_id, thumb_url in traverse_obj(metadata, (
            ('thumbs', 'thumbnails'), {dict.items}, lambda _, v: url_or_none(v[1]),
        )):
            thumbnails.append({
                'id': thumb_id,
                'url': thumb_url,
            })
```

Code after:
    }]

    def _real_extract(self, url):
        video_id = self._match_id(url)
        metadata = self._download_json(f'https://api.watch.thechosen.tv/v1/videos/{video_id}', video_id)

        formats, subtitles = [], {}
        for fmt_url in traverse_obj(metadata, ('details', 'video', ..., 'url', {url_or_none})):
            ext = determine_ext(fmt_url)
            if ext == 'm3u8':
                fmts, subs = self._extract_m3u8_formats_and_subtitles(fmt_url, video_id, 'mp4', fatal=False)
            elif ext == 'mpd':
                fmts, subs = self._extract_mpd_formats_and_subtitles(fmt_url, video_id, fatal=False)
            else:
                self.report_warning(f'Skipping unsupported format extension "{ext}"', video_id=video_id)
                continue
            formats.extend(fmts)
            self._merge_subtitles(subs, target=subtitles)

        thumbnails = []
        for thumb_id, thumb_url in traverse_obj(metadata, (
            ('thumbs', 'thumbnails'), {dict.items}, lambda _, v: url_or_none(v[1]),
        )):
            thumbnails.append({
                'id': thumb_id,
                'url': thumb_url,
            })

        return {
            'id': video_id,
            **traverse_obj(metadata, ({
                'title': ('title', {str}),
                'description': ('description', {str}),
                'duration': ('duration', {int_or_none}),
            })),
            'thumbnails': thumbnails,
            'formats': formats,
            'subtitles': subtitles,
        }


class TheChosenGroupIE(FrontroGroupBaseIE):
    _WORKING = False
    _CHANNEL_ID = '12884901895'
    _VIDEO_EXTRACTOR = TheChosenIE
    _VIDEO_URL_TMPL = 'https://watch.thechosen.tv/watch/%s'

    _VALID_URL = r'https?://(?:www\.)?watch\.thechosen\.tv/group/(?P<id>[0-9]+)'
    _TESTS = [{
        'url': 'https://watch.thechosen.tv/group/309237658592',
        'info_dict': {