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

Code before:
                'id': 'budem-12',
                'title': 'Екатерина Михайлова: "Горе от ума" не про женщин написана',
                'description': 'md5:d9ce1fc1fb5fc7b7a4e7a0b84a7861c3',
                'thumbnail': r're:https?://.*\.jpg$',
                'ext': 'mp3',
                'channel': 'Все там будем',
                'channel_id': 'budem',
                'channel_url': 'https://budem.mave.digital/',
            },
        },
    ]

    def _real_extract(self, url):
        channel_id, short_id = self._match_valid_url(url).group('channel_id', 'short_id')

        channel_url = f'https://{channel_id}.mave.digital/'

        video_id = f'{channel_id}-{short_id}'

        webpage = self._download_webpage(url, video_id)

        # Format: "TITLE — Подкаст «CHANNEL»"
        page_title = self._html_search_regex(r'<title>(.+?)</title>', webpage, 'title')
        match = re.search(r'^(.+?)\s*—\s*(.+?)«(.+?)»', page_title)
        title = match.group(1).strip()
        channel = match.group(3).strip()

        return {
            'id': video_id,
            'title': title,
            'description': self._og_search_description(webpage),
            'channel': channel,
            'channel_id': channel_id,
            'channel_url': channel_url,
            'url': self._mave_link(webpage, video_id),
            'thumbnail': self._og_search_thumbnail(webpage),
        }

    def _mave_link(self, webpage, video_id):
        data = get_element_by_id('__NUXT_DATA__', webpage)

        jdata = json.loads(data)

        for value in jdata:
            if isinstance(value, str):
                if value.endswith('.mp3'):
                    link_id = value
                    break

        if link_id is None:
            raise ExtractorError('Unable to find mp3 file link', video_id=video_id)

Review comment (suggestion):
Thanks to 51887484e46ab6015c041cb1ab626a55f25a03bd, we are now able to easily parse the JSON embedded in these webpages with `_search_nuxt_json`. I've gone ahead and merged master into your PR branch, so we can do this:

```suggestion
        channel_id, slug = self._match_valid_url(url).group('channel', 'id')
        display_id = f'{channel_id}-{slug}'
        webpage = self._download_webpage(url, display_id)
        data = traverse_obj(
            self._search_nuxt_json(webpage, display_id),
            ('data', lambda _, v: v['activeEpisodeData'], any, {require('podcast data')}))
```

(you'll need to import `require` and `traverse_obj` from `..utils.traversal`)

Code after:
            'thumbnail': r're:https://.+/storage/podcasts/.+\.jpg',
            'series': 'Очень личное',
            'series_id': '2e0c3749-6df2-4946-82f4-50691419c065',
            'season': 'Season 3',
            'season_number': 3,
            'episode': 'Episode 3',
            'episode_number': 3,
            'timestamp': 1747817300,
            'upload_date': '20250521',
        },
    }, {
        'url': 'https://budem.mave.digital/ep-12',
        'md5': 'e1ce2780fcdb6f17821aa3ca3e8c919f',
        'info_dict': {
            'id': '41898bb5-ff57-4797-9236-37a8e537aa21',
            'ext': 'mp3',
            'display_id': 'budem-ep-12',
            'title': 'Екатерина Михайлова: "Горе от ума" не про женщин написана',
            'description': 'md5:fa3bdd59ee829dfaf16e3efcb13f1d19',
            'uploader': 'Полина Цветкова+Евгения Акопова',
            'channel': 'Все там будем',
            'channel_id': 'budem',
            'channel_url': 'https://budem.mave.digital/',
            'view_count': int,
            'like_count': int,
            'dislike_count': int,
            'age_limit': 18,
            'duration': 3664,
            'thumbnail': r're:https://.+/storage/podcasts/.+\.jpg',
            'series': 'Все там будем',
            'series_id': 'fe9347bf-c009-4ebd-87e8-b06f2f324746',
            'season': 'Season 2',
            'season_number': 2,
            'episode': 'Episode 5',
            'episode_number': 5,
            'timestamp': 1735538400,
            'upload_date': '20241230',
        },
    }]
    _API_BASE_URL = 'https://api.mave.digital/'

    def _real_extract(self, url):
        channel_id, slug = self._match_valid_url(url).group('channel', 'id')
        display_id = f'{channel_id}-{slug}'
        webpage = self._download_webpage(url, display_id)
        data = traverse_obj(
            self._search_nuxt_json(webpage, display_id),
            ('data', lambda _, v: v['activeEpisodeData'], any, {require('podcast data')}))

        return {
            'display_id': display_id,