ronantakizawa/codereview-bench huggingface dataset:
Repository: yt-dlp/yt-dlp
File: yt_dlp/extractor/tarangplus.py (Python)

Code before:
            'id': 'latest-songs',
            'title': 'Latest Songs',
        },
        'playlist_mincount': 46,
    }, {
        'url': 'https://tarangplus.in/premium-serials-episodes/all',
        'info_dict': {
            'id': 'premium-serials-episodes',
            'title': 'Primetime Latest Episodes',
        },
        'playlist_mincount': 100,
    }]

    def _entries(self, webpage):
        items = get_elements_html_by_class('item', webpage)
        for item in items:
            a_elem = get_element_text_and_html_by_tag('a', item)[1]
            url = urljoin(self._BASE_URL, extract_attributes(a_elem)['href'])
            yield self.url_result(url, TarangPlusVideoIE)

    def _real_extract(self, url):
        display_id = self._match_id(url)
        webpage = self._download_webpage(url, display_id)
        title = get_element_by_id('al_title', webpage)
        entries = self._entries(webpage)
        return self.playlist_result(entries, display_id, title)


Review comment (refactor):
I prefer to use the traversal `find_element*` helpers whenever possible instead of the `get_element*` utils, since the latter are brittle and hard to remember how to use IMO

```suggestion

        return self.playlist_result(
            self._entries(webpage), display_id,
            traverse_obj(webpage, ({find_element(id='al_title')}, {clean_html})))
```

Code after:
            'title': 'Chhota Jaga',
        },
        'playlist_mincount': 33,
    }, {
        'url': 'https://tarangplus.in/kids-yali-show/all',
        'info_dict': {
            'id': 'kids-yali-show',
            'title': 'Yali',
        },
        'playlist_mincount': 10,
    }, {
        'url': 'https://tarangplus.in/trailer/all',
        'info_dict': {
            'id': 'trailer',
            'title': 'Trailer',
        },
        'playlist_mincount': 57,
    }, {
        'url': 'https://tarangplus.in/latest-songs/all',
        'info_dict': {
            'id': 'latest-songs',
            'title': 'Latest Songs',
        },
        'playlist_mincount': 46,
    }, {
        'url': 'https://tarangplus.in/premium-serials-episodes/all',
        'info_dict': {
            'id': 'premium-serials-episodes',
            'title': 'Primetime Latest Episodes',
        },
        'playlist_mincount': 100,
    }]

    def _entries(self, webpage):
        for url_path in traverse_obj(webpage, (
            {find_elements(cls='item')}, ...,
            {find_elements(tag='a', attr='href', value='/.+', html=True, regex=True)},
            ..., {extract_attributes}, 'href',
        )):
            yield self.url_result(urljoin(self._BASE_URL, url_path), TarangPlusVideoIE)

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

        return self.playlist_result(
            self._entries(webpage), display_id,
            traverse_obj(webpage, ({find_element(id='al_title')}, {clean_html})))
Repository: yt-dlp/yt-dlp
File: yt_dlp/extractor/tarangplus.py (Python)

Code before:
import base64
import binascii
import functools
import re

from .common import InfoExtractor
from ..dependencies import Cryptodome
from ..utils import (
    ExtractorError,
    OnDemandPagedList,
    extract_attributes,
    get_element_by_id,
    get_element_html_by_class,
    get_element_text_and_html_by_tag,
    get_elements_html_by_class,
    traverse_obj,
    urljoin,
)


class TarangPlusBaseIE(InfoExtractor):
    _BASE_URL = 'https://tarangplus.in'


class TarangPlusVideoIE(TarangPlusBaseIE):
    IE_NAME = 'tarangplus:video'
    _VALID_URL = r'https?://(?:www\.)?tarangplus\.in/(?:movies|[^#?/]+/[^#?/]+)/(?!episodes$)(?P<id>[^#?/]+)'
    _TESTS = [{
        'url': 'https://tarangplus.in/tarangaplus-originals/khitpit/khitpit-ep-10',
        'md5': '78ce056cee755687b8a48199909ecf53',
        'info_dict': {
            'id': '67b8206719521d054c0059b7',
            'display_id': 'khitpit-ep-10',
            'ext': 'mp4',
            'title': 'Khitpit Ep-10',
            'description': 'md5:a45b805cb628e15c853d78b0406eab48',
            'thumbnail': r're:https?://.*\.jpg',
            'duration': 756.0,
            'timestamp': 1740355200,

Review comment (refactor):
```suggestion
    clean_html,
    extract_attributes,
    urljoin,
)
from ..utils.traversal import (
    find_element,
    find_elements,
    require,
    traverse_obj,
)
```

Code after:
import base64
import binascii
import functools
import re

from .common import InfoExtractor
from ..dependencies import Cryptodome
from ..utils import (
    ExtractorError,
    OnDemandPagedList,
    clean_html,
    extract_attributes,
    urljoin,
)
from ..utils.traversal import (
    find_element,
    find_elements,
    require,
    traverse_obj,
)


class TarangPlusBaseIE(InfoExtractor):
    _BASE_URL = 'https://tarangplus.in'


class TarangPlusVideoIE(TarangPlusBaseIE):
    IE_NAME = 'tarangplus:video'
    _VALID_URL = r'https?://(?:www\.)?tarangplus\.in/(?:movies|[^#?/]+/[^#?/]+)/(?!episodes)(?P<id>[^#?/]+)'
    _TESTS = [{
        'url': 'https://tarangplus.in/tarangaplus-originals/khitpit/khitpit-ep-10',
        'md5': '78ce056cee755687b8a48199909ecf53',
        'info_dict': {
            'id': '67b8206719521d054c0059b7',
            'display_id': 'khitpit-ep-10',
            'ext': 'mp4',
            'title': 'Khitpit Ep-10',
            'description': 'md5:a45b805cb628e15c853d78b0406eab48',
            'thumbnail': r're:https?://.*\.jpg',
Repository: yt-dlp/yt-dlp
File: yt_dlp/extractor/nebula.py (Python)

Code before:
import itertools
import json

from .art19 import Art19IE
from .common import InfoExtractor
from ..networking.common import Request
from ..networking.exceptions import HTTPError
from ..utils import (
    ExtractorError,
    int_or_none,
    make_archive_id,
    parse_iso8601,
    smuggle_url,
    try_call,
    unsmuggle_url,
    update_url_query,
    url_or_none,
    urljoin,
)
from ..utils.traversal import traverse_obj

_BASE_URL_RE = r'https?://(?:www\.|beta\.)?(?:watchnebula\.com|nebula\.app|nebula\.tv)'


class NebulaBaseIE(InfoExtractor):
    _NETRC_MACHINE = 'watchnebula'
    _token = _api_token = None

    def _perform_login(self, username, password):
        try:
            response = self._download_json(

Review comment (suggestion):
```suggestion
from ..networking import PATCHRequest
```

Code after:
import itertools
import json

from .art19 import Art19IE
from .common import InfoExtractor
from ..networking import PATCHRequest
from ..networking.exceptions import HTTPError
from ..utils import (
    ExtractorError,
    int_or_none,
    make_archive_id,
    parse_iso8601,
    smuggle_url,
    try_call,
    unsmuggle_url,
    update_url_query,
    url_or_none,
    urljoin,
)
from ..utils.traversal import traverse_obj

_BASE_URL_RE = r'https?://(?:www\.|beta\.)?(?:watchnebula\.com|nebula\.app|nebula\.tv)'


class NebulaBaseIE(InfoExtractor):
    _NETRC_MACHINE = 'watchnebula'
    _token = _api_token = None

    def _perform_login(self, username, password):
        try:
            response = self._download_json(
Repository: yt-dlp/yt-dlp
File: yt_dlp/extractor/nobelprize.py (Python)

Code before:
            'timestamp': 1504883793,
            'upload_date': '20170908',
        },
    }, {
        'url': 'https://mediaplayer.nobelprize.org/mediaplayer/?qid=12693',
        'info_dict': {
            'id': '12693',
            'ext': 'mp4',
            'title': 'Nobel Lecture by Peter Higgs',
            'description': 'md5:9b12e275dbe3a8138484e70e00673a05',
            'duration': 1800.0,
            'thumbnail': r're:https?://www\.nobelprize\.org/images/.+\.jpg',
            'timestamp': 1504883793,
            'upload_date': '20170908',
        },
    }]

    def _real_extract(self, url):
        video_id = traverse_obj(parse_qs(url), (
            ('id', 'qid'), -1, {int_or_none}, {str_or_none}, any))
        if not video_id:
            raise UnsupportedError(url)
        webpage = self._download_webpage(
            update_url(url, netloc='mediaplayer.nobelprize.org'), video_id)

        return {
            'id': video_id,
            'title': self._html_search_meta('caption', webpage),
            'description': traverse_obj(webpage, (
                {find_element(tag='span', attr='itemprop', value='description')}, {clean_html})),
            'duration': parse_duration(self._html_search_meta('duration', webpage)),
            **traverse_obj(next(self._yield_json_ld(webpage, video_id)), {
                'thumbnail': ('thumbnail_url', {self._proto_relative_url}, {url_or_none}),
                'timestamp': ('uploadDate', {unified_timestamp}),
                'url': ('contentUrl', {url_or_none}),
            }),
        }


Review comment (suggestion):
```suggestion
            **self._search_json_ld(webpage, video_id),
            'id': video_id,
```

Code after:
        },
    }, {
        'url': 'https://mediaplayer.nobelprize.org/mediaplayer/?qid=12693',
        'info_dict': {
            'id': '12693',
            'ext': 'mp4',
            'title': 'Nobel Lecture by Peter Higgs',
            'description': 'md5:9b12e275dbe3a8138484e70e00673a05',
            'duration': 1800.0,
            'thumbnail': r're:https?://www\.nobelprize\.org/images/.+\.jpg',
            'timestamp': 1504883793,
            'upload_date': '20170908',
        },
    }]

    def _real_extract(self, url):
        video_id = traverse_obj(parse_qs(url), (
            ('id', 'qid'), -1, {int_or_none}, {str_or_none}, any))
        if not video_id:
            raise UnsupportedError(url)
        webpage = self._download_webpage(
            update_url(url, netloc='mediaplayer.nobelprize.org'), video_id)

        return {
            **self._search_json_ld(webpage, video_id),
            'id': video_id,
            'title': self._html_search_meta('caption', webpage),
            'description': traverse_obj(webpage, (
                {find_element(tag='span', attr='itemprop', value='description')}, {clean_html})),
            'duration': parse_duration(self._html_search_meta('duration', webpage)),
        }
Repository: yt-dlp/yt-dlp
File: yt_dlp/extractor/pandatv.py (Python)

Code before:
from .common import InfoExtractor
from ..utils import (
    ExtractorError,
    UserNotLive,
    int_or_none,
    traverse_obj,
    unified_strdate,
    url_or_none,
    urlencode_postdata,
)


class PandatvLiveIE(InfoExtractor):
    _VALID_URL = r'(?P<base_url>https?://(?:www\.|m\.)?pandalive\.co\.kr)/play/(?P<id>[\da-z]+)'
    _TESTS = [{
        'url': 'https://www.pandalive.co.kr/play/bebenim',
        'info_dict': {
            'id': 'bebenim',
            'ext': 'mp4',
            'channel': '릴리ෆ',
            'title': r're:앙앙❤ \d{4}-\d{2}-\d{2} \d{2}:\d{2}',
            'thumbnail': r're:https://cdn\.pandalive\.co\.kr/ivs/v1/.+/thumb.jpg',
            'concurrent_view_count': int,
            'like_count': int,
            'live_status': 'is_live',
            'upload_date': str,
        },
        'skip': 'The channel is not currently live',
    }]

    def _real_extract(self, url):
        base_url, channel_id = self._match_valid_url(url).groups()
        http_headers = {'Origin': base_url}

        # Prepare POST data
        post_data = {'action': 'watch', 'userId': channel_id, 'password': '', 'shareLinkType': ''}
        post_data_bytes = urlencode_postdata(post_data)

        # Fetch video metadata

Review comment (refactor):
- is the site called "PandaTV"? or "PandaLive"? Calling the extractor "PandatvLive"  seems confusing

- Since we never actually request the webpage, matching the origin from the input URL is pointless, we can just hardcode `https://www.pandalive.co.kr` below

- Are you sure there's never a `-` or `.` etc in the `channel_id` ?

```suggestion
class PandatvLiveIE(InfoExtractor):
    _VALID_URL = r'https?://(?:www\.|m\.)?pandalive\.co\.kr/play/(?P<id>[\da-z]+)'
```

Code after:
from .common import InfoExtractor
from ..utils import (
    ExtractorError,
    UserNotLive,
    filter_dict,
    int_or_none,
    join_nonempty,
    parse_iso8601,
    url_or_none,
    urlencode_postdata,
)
from ..utils.traversal import traverse_obj


class PandaTvIE(InfoExtractor):
    IE_DESC = 'pandalive.co.kr (팬더티비)'
    _VALID_URL = r'https?://(?:www\.|m\.)?pandalive\.co\.kr/play/(?P<id>\w+)'
    _TESTS = [{
        'url': 'https://www.pandalive.co.kr/play/bebenim',
        'info_dict': {
            'id': 'bebenim',
            'ext': 'mp4',
            'channel': '릴리ෆ',
            'title': r're:앙앙❤ \d{4}-\d{2}-\d{2} \d{2}:\d{2}',
            'thumbnail': r're:https://cdn\.pandalive\.co\.kr/ivs/v1/.+/thumb\.jpg',
            'concurrent_view_count': int,
            'like_count': int,
            'live_status': 'is_live',
            'upload_date': str,
        },
        'skip': 'The channel is not currently live',
    }]

    def _real_extract(self, url):
        channel_id = self._match_id(url)
        video_meta = self._download_json(
            'https://api.pandalive.co.kr/v1/live/play', channel_id,
            'Downloading video meta data', 'Unable to download video meta data',
            data=urlencode_postdata(filter_dict({
Repository: yt-dlp/yt-dlp
File: yt_dlp/extractor/_extractors.py (Python)

Code before:
)
from .openrec import (
    OpenRecCaptureIE,
    OpenRecIE,
    OpenRecMovieIE,
)
from .ora import OraTVIE
from .orf import (
    ORFIPTVIE,
    ORFONIE,
    ORFFM4StoryIE,
    ORFPodcastIE,
    ORFRadioIE,
)
from .outsidetv import OutsideTVIE
from .owncloud import OwnCloudIE
from .packtpub import (
    PacktPubCourseIE,
    PacktPubIE,
)
from .palcomp3 import (
    PalcoMP3ArtistIE,
    PalcoMP3IE,
    PalcoMP3VideoIE,
)
from .pandatv import PandaTVIE
from .panopto import (
    PanoptoIE,
    PanoptoListIE,
    PanoptoPlaylistIE,
)
from .paramountplus import (
    ParamountPlusIE,
    ParamountPlusSeriesIE,
)
from .parler import ParlerIE
from .parlview import ParlviewIE
from .parti import (
    PartiLivestreamIE,
    PartiVideoIE,
)
from .patreon import (
    PatreonCampaignIE,
    PatreonIE,
)
from .pbs import (
    PBSIE,
    PBSKidsIE,
)
from .pearvideo import PearVideoIE
from .peekvids import (

Review comment (suggestion):
```suggestion
from .pandatv import PandaTvIE
```

Code after:
)
from .outsidetv import OutsideTVIE
from .owncloud import OwnCloudIE
from .packtpub import (
    PacktPubCourseIE,
    PacktPubIE,
)
from .palcomp3 import (
    PalcoMP3ArtistIE,
    PalcoMP3IE,
    PalcoMP3VideoIE,
)
from .pandatv import PandaTvIE
from .panopto import (
    PanoptoIE,
    PanoptoListIE,
    PanoptoPlaylistIE,
)
from .parler import ParlerIE
from .parlview import ParlviewIE
from .parti import (
    PartiLivestreamIE,
    PartiVideoIE,
)
from .patreon import (
    PatreonCampaignIE,
    PatreonIE,
)
from .pbs import (
    PBSIE,
    PBSKidsIE,
)
from .pearvideo import PearVideoIE
from .peekvids import (
    PeekVidsIE,
    PlayVidsIE,
)
from .peertube import (
    PeerTubeIE,
    PeerTubePlaylistIE,
)
from .peertv import PeerTVIE
from .peloton import (
    PelotonIE,
    PelotonLiveIE,
)
from .performgroup import PerformGroupIE
from .periscope import (
    PeriscopeIE,
    PeriscopeUserIE,
)
Repository: yt-dlp/yt-dlp
File: yt_dlp/extractor/pandatv.py (Python)

Code before:
from .common import InfoExtractor
from ..utils import (
    ExtractorError,
    UserNotLive,
    int_or_none,
    traverse_obj,
    unified_strdate,
    url_or_none,
    urlencode_postdata,
)


class PandaTVIE(InfoExtractor):
    _VALID_URL = r'https?://(?:www\.|m\.)?pandalive\.co\.kr/play/(?P<id>[\da-z]+)'
    _TESTS = [{
        'url': 'https://www.pandalive.co.kr/play/bebenim',
        'info_dict': {
            'id': 'bebenim',
            'ext': 'mp4',
            'channel': '릴리ෆ',
            'title': r're:앙앙❤ \d{4}-\d{2}-\d{2} \d{2}:\d{2}',
            'thumbnail': r're:https://cdn\.pandalive\.co\.kr/ivs/v1/.+/thumb.jpg',
            'concurrent_view_count': int,
            'like_count': int,
            'live_status': 'is_live',
            'upload_date': str,
        },
        'skip': 'The channel is not currently live',
    }]

    def _real_extract(self, url):
        channel_id = self._match_id(url)
        http_headers = {'Origin': 'https://www.pandalive.co.kr'}

        video_meta = self._download_json(
            'https://api.pandalive.co.kr/v1/live/play', channel_id,
            'Downloading video meta data', 'Unable to download video meta data',
            data=urlencode_postdata({

Review comment (refactor):
```suggestion
class PandaTvIE(InfoExtractor):
```

Code after:
from .common import InfoExtractor
from ..utils import (
    ExtractorError,
    UserNotLive,
    filter_dict,
    int_or_none,
    join_nonempty,
    parse_iso8601,
    url_or_none,
    urlencode_postdata,
)
from ..utils.traversal import traverse_obj


class PandaTvIE(InfoExtractor):
    IE_DESC = 'pandalive.co.kr (팬더티비)'
    _VALID_URL = r'https?://(?:www\.|m\.)?pandalive\.co\.kr/play/(?P<id>\w+)'
    _TESTS = [{
        'url': 'https://www.pandalive.co.kr/play/bebenim',
        'info_dict': {
            'id': 'bebenim',
            'ext': 'mp4',
            'channel': '릴리ෆ',
            'title': r're:앙앙❤ \d{4}-\d{2}-\d{2} \d{2}:\d{2}',
            'thumbnail': r're:https://cdn\.pandalive\.co\.kr/ivs/v1/.+/thumb\.jpg',
            'concurrent_view_count': int,
            'like_count': int,
            'live_status': 'is_live',
            'upload_date': str,
        },
        'skip': 'The channel is not currently live',
    }]

    def _real_extract(self, url):
        channel_id = self._match_id(url)
        video_meta = self._download_json(
            'https://api.pandalive.co.kr/v1/live/play', channel_id,
            'Downloading video meta data', 'Unable to download video meta data',
Repository: yt-dlp/yt-dlp
File: yt_dlp/extractor/volejtv.py (Python)

Code before:
import functools

from .common import InfoExtractor
from ..utils import (
    InAdvancePagedList,
    str_or_none,
    strftime_or_none,
    traverse_obj,
    unified_timestamp,
    url_or_none,
)


class VolejTVBaseIE(InfoExtractor):
    _API_URL = 'https://api-volejtv-prod.apps.okd4.devopsie.cloud/api'

    def _call_api(self, endpoint, api_id, query={}):
        return self._download_json(f'{self._API_URL}/{endpoint}', api_id,
                                   'Downloading JSON', 'Unable to download JSON', query=query)


class VolejTVIE(VolejTVBaseIE):
    IE_NAME = 'volejtv:match'
    _VALID_URL = r'https?://volej\.tv/match/(?P<id>\d+)'
    _TESTS = [{
        'url': 'https://volej.tv/match/270579',
        'info_dict': {
            'id': '270579',
            'ext': 'mp4',
            'title': 'CZE-SWE (2024-06-16)',
            'categories': ['ženy'],
            'series': 'ZLATÁ EVROPSKÁ VOLEJBALOVÁ LIGA',
            'season': '2023-2024',
            'timestamp': 1718553600,
            'upload_date': '20240616',
        },
    }, {
        'url': 'https://volej.tv/match/487520',
        'info_dict': {
            'id': '487520',
            'ext': 'mp4',
            'thumbnail': r're:https://.+\.(png|jpeg)',
            'title': 'CZE-FRA (2024-09-06)',
            'categories': ['mládež'],

Review comment (suggestion):
IMO we only need the `_call_api` method **or** the `_API_URL` class constant; we don't need both. I'd prefer to inline the api base url in the method

```suggestion
    def _call_api(self, endpoint, display_id, query=None):
        return self._download_json(
            f'https://api-volejtv-prod.apps.okd4.devopsie.cloud/api/{endpoint}', display_id, query=query)
```

Code after:
import functools

from .common import InfoExtractor
from ..utils import (
    InAdvancePagedList,
    int_or_none,
    join_nonempty,
    orderedSet,
    str_or_none,
    strftime_or_none,
    unified_timestamp,
    url_or_none,
)
from ..utils.traversal import (
    require,
    traverse_obj,
)


class VolejTVBaseIE(InfoExtractor):
    TBR_HEIGHT_MAPPING = {
        '6000': 1080,
        '2400': 720,
        '1500': 480,
        '800': 360,
    }

    def _call_api(self, endpoint, display_id, query=None):
        return self._download_json(
            f'https://api-volejtv-prod.apps.okd4.devopsie.cloud/api/{endpoint}',
            display_id, query=query)


class VolejTVIE(VolejTVBaseIE):
    IE_NAME = 'volejtv:match'
    _VALID_URL = r'https?://volej\.tv/match/(?P<id>\d+)'
    _TESTS = [{
        'url': 'https://volej.tv/match/270579',
        'info_dict': {
            'id': '270579',
            'ext': 'mp4',
            'title': 'SWE-CZE (2024-06-16)',
            'categories': ['ženy'],
            'series': 'ZLATÁ EVROPSKÁ VOLEJBALOVÁ LIGA',
Repository: yt-dlp/yt-dlp
File: yt_dlp/extractor/volejtv.py (Python)

Code before:
import functools

from .common import InfoExtractor
from ..utils import (
    InAdvancePagedList,
    int_or_none,
    join_nonempty,
    orderedSet,
    str_or_none,
    strftime_or_none,
    traverse_obj,
    unified_timestamp,
    url_or_none,
)


class VolejTVBaseIE(InfoExtractor):
    TBR_HEIGHT_MAPPING = {'6000': 1080, '2400': 720, '1500': 480, '800': 360}

    def _call_api(self, endpoint, display_id, query=None):
        return self._download_json(
            f'https://api-volejtv-prod.apps.okd4.devopsie.cloud/api/{endpoint}', display_id, query=query)


class VolejTVIE(VolejTVBaseIE):
    IE_NAME = 'volejtv:match'
    _VALID_URL = r'https?://volej\.tv/match/(?P<id>\d+)'
    _TESTS = [{
        'url': 'https://volej.tv/match/270579',
        'info_dict': {
            'id': '270579',
            'ext': 'mp4',
            'title': 'SWE-CZE (2024-06-16)',
            'categories': ['ženy'],
            'series': 'ZLATÁ EVROPSKÁ VOLEJBALOVÁ LIGA',
            'season': '2023-2024',
            'timestamp': 1718553600,
            'upload_date': '20240616',
        },
    }, {
        'url': 'https://volej.tv/match/487520',
        'info_dict': {
            'id': '487520',

Review comment (suggestion):
```suggestion
    TBR_HEIGHT_MAPPING = {
        '6000': 1080,
        '2400': 720,
        '1500': 480,
        '800': 360,
    }
```

Code after:
import functools

from .common import InfoExtractor
from ..utils import (
    InAdvancePagedList,
    int_or_none,
    join_nonempty,
    orderedSet,
    str_or_none,
    strftime_or_none,
    unified_timestamp,
    url_or_none,
)
from ..utils.traversal import (
    require,
    traverse_obj,
)


class VolejTVBaseIE(InfoExtractor):
    TBR_HEIGHT_MAPPING = {
        '6000': 1080,
        '2400': 720,
        '1500': 480,
        '800': 360,
    }

    def _call_api(self, endpoint, display_id, query=None):
        return self._download_json(
            f'https://api-volejtv-prod.apps.okd4.devopsie.cloud/api/{endpoint}',
            display_id, query=query)


class VolejTVIE(VolejTVBaseIE):
    IE_NAME = 'volejtv:match'
    _VALID_URL = r'https?://volej\.tv/match/(?P<id>\d+)'
    _TESTS = [{
        'url': 'https://volej.tv/match/270579',
        'info_dict': {
            'id': '270579',
            'ext': 'mp4',
            'title': 'SWE-CZE (2024-06-16)',
            'categories': ['ženy'],