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

Code before:
            'description': 'md5:35074f6190cef52b05dd133bb2ef460e',
            'upload_date': '20220525',
            'timestamp': 1653460637,
            'release_date': '20220525',
            'thumbnail': 'https://images.noiceid.cc/catalog/content-1653460337625',
            'title': 'Eps 1: Dijodohin Sama Anak Pak RT',
            'modified_timestamp': 1669030647,
            'season_number': 1,
            'modified_date': '20221121',
            'categories': ['Cerita dan Drama'],
            'duration': 1830,
            'season': 'Season 1',
            'channel_id': '60193f6b-d24d-4b23-913b-ceed5a731e74',
            'dislike_count': int,
            'like_count': int,
            'comment_count': int,
            'channel': 'Dear Jerome',
            'channel_follower_count': int,
        }
    }]

    def _get_formats_and_subtitles(self, media_url, video_id):
        formats, subtitles = [], {}
        if isinstance(media_url, str):
            media_url = [media_url]
        for url in media_url:
            ext = determine_ext(url)
            if ext == 'm3u8':
                fmts, subs = self._extract_m3u8_formats_and_subtitles(url, video_id)
                formats.extend(fmts)
                self._merge_subtitles(subs, target=subtitles)
            else:
                formats.append({
                    'url': url,
                    'ext': 'mp3',
                })
        return formats, subtitles

    def _real_extract(self, url):
        display_id = self._match_id(url)
        webpage = self._download_webpage(url, display_id)

        nextjs_data = self._search_nextjs_data(webpage, display_id)['props']['pageProps']['contentDetails']

        media_url_list = traverse_obj(nextjs_data, (('rawContentUrl', 'url'), ))
        formats, subtitles = self._get_formats_and_subtitles(media_url_list, display_id)

        return {
            'id': nextjs_data.get('id') or display_id,
            'title': nextjs_data.get('title') or self._html_search_meta('og:title', webpage),
            'formats': formats,

Review comment (suggestion):
```suggestion
        for url in variadic(media_url):
```

Code after:
            'release_timestamp': 1653488220,
            'description': 'md5:35074f6190cef52b05dd133bb2ef460e',
            'upload_date': '20220525',
            'timestamp': 1653460637,
            'release_date': '20220525',
            'thumbnail': 'https://images.noiceid.cc/catalog/content-1653460337625',
            'title': 'Eps 1: Dijodohin Sama Anak Pak RT',
            'modified_timestamp': 1669030647,
            'season_number': 1,
            'modified_date': '20221121',
            'categories': ['Cerita dan Drama'],
            'duration': 1830,
            'season': 'Season 1',
            'channel_id': '60193f6b-d24d-4b23-913b-ceed5a731e74',
            'dislike_count': int,
            'like_count': int,
            'comment_count': int,
            'channel': 'Dear Jerome',
            'channel_follower_count': int,
        }
    }]

    def _get_formats_and_subtitles(self, media_url, video_id):
        formats, subtitles = [], {}
        for url in variadic(media_url):
            ext = determine_ext(url)
            if ext == 'm3u8':
                fmts, subs = self._extract_m3u8_formats_and_subtitles(url, video_id)
                formats.extend(fmts)
                self._merge_subtitles(subs, target=subtitles)
            else:
                formats.append({
                    'url': url,
                    'ext': 'mp3',
                    'vcodec': 'none',
                    'acodec': 'mp3',
                })
        return formats, subtitles

    def _real_extract(self, url):
        display_id = self._match_id(url)
        webpage = self._download_webpage(url, display_id)

        nextjs_data = self._search_nextjs_data(webpage, display_id)['props']['pageProps']['contentDetails']

        media_url_list = traverse_obj(nextjs_data, (('rawContentUrl', 'url'), ))
        formats, subtitles = self._get_formats_and_subtitles(media_url_list, display_id)

        return {
            'id': nextjs_data.get('id') or display_id,
            'title': nextjs_data.get('title') or self._html_search_meta('og:title', webpage),