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

Code before:

from .common import InfoExtractor
from ..utils import (
    ExtractorError,
    get_element_by_id,
)


class MaveIE(InfoExtractor):
    _VALID_URL = r'https?://(?P<channel_id>[a-z]+)\.mave\.digital/ep-(?P<short_id>[0-9]+)'
    _TESTS = [
        {
            'url': 'https://ochenlichnoe.mave.digital/ep-25',
            'md5': 'aa3e513ef588b4366df1520657cbc10c',
            'info_dict': {
                'id': 'ochenlichnoe-25',
                'title': 'Между мной и миром: психология самооценки',
                'description': 'md5:83183d7002dc32fbebc3ccecd4a1ac03',
                'thumbnail': r're:https?://.*\.jpg$',
                'ext': 'mp3',
                'channel': 'Очень личное',
                'channel_id': 'ochenlichnoe',
                'channel_url': 'https://ochenlichnoe.mave.digital/',
            },
        },
        {
            'url': 'https://budem.mave.digital/ep-12',
            'md5': 'e1ce2780fcdb6f17821aa3ca3e8c919f',
            'info_dict': {
                '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»"

Review comment (suggestion):
to go with the formatting suggestion above:
```suggestion
    }, {
```
and so forth

Code after:
from .common import InfoExtractor
from ..utils import (
    clean_html,
    int_or_none,
    parse_iso8601,
    urljoin,
)
from ..utils.traversal import require, traverse_obj


class MaveIE(InfoExtractor):
    _VALID_URL = r'https?://(?P<channel>[\w-]+)\.mave\.digital/(?P<id>ep-\d+)'
    _TESTS = [{
        'url': 'https://ochenlichnoe.mave.digital/ep-25',
        'md5': 'aa3e513ef588b4366df1520657cbc10c',
        'info_dict': {
            'id': '4035f587-914b-44b6-aa5a-d76685ad9bc2',
            'ext': 'mp3',
            'display_id': 'ochenlichnoe-ep-25',
            'title': 'Между мной и миром: психология самооценки',
            'description': 'md5:4b7463baaccb6982f326bce5c700382a',
            'uploader': 'Самарский университет',
            'channel': 'Очень личное',
            'channel_id': 'ochenlichnoe',
            'channel_url': 'https://ochenlichnoe.mave.digital/',
            'view_count': int,
            'like_count': int,
            'dislike_count': int,
            'duration': 3744,
            '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',