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

Code before:
            'id': 'sat7.faulio.com_18165',
            'ext': 'mp4',
            'display_id': 'ep-13-ADHD-18165',
            'title': 'ADHD and creativity',
            'episode': 'ADHD and creativity',
            'description': '',
            'series': 'ADHD Podcast',
            'season': 'Season 1',
            'season_number': 1,
            'episode_number': 13,
            'thumbnail': r're:^https?://.*\.jpg$',
            'duration': 2492,
            'age_limit': 0,
        },
    }, {
        'url': 'https://aloula.sba.sa/en/episode/0',
        'only_matching': True,
    }]

    def _real_extract(self, url):
        video_id = self._match_id(url)

        api_base = self._get_api_base(url, video_id)

        video_info = self._download_json(f'{api_base}/video/{video_id}', video_id, fatal=False)
        player_info = self._download_json(f'{api_base}/video/{video_id}/player', video_id)

        headers = self._get_headers(url)
        formats = []
        subtitles = {}
        if hls_url := traverse_obj(player_info, ('settings', 'protocols', 'hls', {url_or_none})):
            fmts, subs = self._extract_m3u8_formats_and_subtitles(
                hls_url, video_id, 'mp4', m3u8_id='hls', fatal=False, headers=headers)
            formats.extend(fmts)
            self._merge_subtitles(subs, target=subtitles)

        if mpd_url := traverse_obj(player_info, ('settings', 'protocols', 'dash', {url_or_none})):
            fmts, subs = self._extract_mpd_formats_and_subtitles(
                mpd_url, video_id, mpd_id='dash', fatal=False, headers=headers)
            formats.extend(fmts)
            self._merge_subtitles(subs, target=subtitles)

        return {
            'id': f'{urllib.parse.urlparse(api_base).hostname}_{video_id}',
            **traverse_obj(traverse_obj(video_info, ('blocks', 0)), {
                'display_id': ('slug', {str}),
                'title': ('title', {str}),
                'episode': ('title', {str}),
                'description': ('description', {str}),
                'series': ('program_title', {str}),
                'season_number': ('season_number', {int_or_none}),

Review comment (suggestion):
```suggestion
        video_id = self._match_id(url)
        api_base = self._get_api_base(url, video_id)
        video_info = self._download_json(f'{api_base}/video/{video_id}', video_id, fatal=False)
        player_info = self._download_json(f'{api_base}/video/{video_id}/player', video_id)
```

Code after:
            'id': 'sat7.faulio.com_18165',
            'ext': 'mp4',
            'display_id': 'ep-13-ADHD-18165',
            'title': 'ADHD and creativity',
            'episode': 'ADHD and creativity',
            'description': '',
            'series': 'ADHD Podcast',
            'season': 'Season 1',
            'season_number': 1,
            'episode_number': 13,
            'thumbnail': r're:^https?://.*\.jpg$',
            'duration': 2492,
            'age_limit': 0,
        },
    }, {
        'url': 'https://aloula.sba.sa/en/episode/0',
        'only_matching': True,
    }]

    def _real_extract(self, url):
        video_id = self._match_id(url)
        api_base = self._get_api_base(url, video_id)
        video_info = self._download_json(f'{api_base}/video/{video_id}', video_id, fatal=False)
        player_info = self._download_json(f'{api_base}/video/{video_id}/player', video_id)

        headers = self._get_headers(url)
        formats = []
        subtitles = {}
        if hls_url := traverse_obj(player_info, ('settings', 'protocols', 'hls', {url_or_none})):
            fmts, subs = self._extract_m3u8_formats_and_subtitles(
                hls_url, video_id, 'mp4', m3u8_id='hls', fatal=False, headers=headers)
            formats.extend(fmts)
            self._merge_subtitles(subs, target=subtitles)

        if mpd_url := traverse_obj(player_info, ('settings', 'protocols', 'dash', {url_or_none})):
            fmts, subs = self._extract_mpd_formats_and_subtitles(
                mpd_url, video_id, mpd_id='dash', fatal=False, headers=headers)
            formats.extend(fmts)
            self._merge_subtitles(subs, target=subtitles)

        return {
            'id': f'{urllib.parse.urlparse(api_base).hostname}_{video_id}',
            **traverse_obj(traverse_obj(video_info, ('blocks', 0)), {
                'display_id': ('slug', {str}),
                'title': ('title', {str}),
                'episode': ('title', {str}),
                'description': ('description', {str}),
                'series': ('program_title', {str}),
                'season_number': ('season_number', {int_or_none}),
                'episode_number': ('episode', {int_or_none}),
                'thumbnail': ('image', {url_or_none}),