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

Code before:
            teams.remove('FIN')
        data['title'] = join_nonempty(join_nonempty(*teams, delim='-'),
                                      f"({strftime_or_none(data['timestamp'], '%Y-%m-%d')})", delim=' ')
        return data


class VolejTVClubPlaylistIE(VolejTVBaseIE):
    IE_NAME = 'volejtv:club'
    _VALID_URL = r'https?://volej\.tv/klub/(?P<id>\d+)'
    _TESTS = [{
        'url': 'https://volej.tv/klub/1173',
        'info_dict': {
            'id': '1173',
            'title': 'VK Jihostroj České Budějovice',
        },
        'playlist_mincount': 30,
    }]
    _PAGE_SIZE = 6

    def _get_page(self, playlist_id, page):
        return self._call_api(f'match/by-team-id-paginated/{playlist_id}', playlist_id,
                              query={'page': page + 1, 'take': self._PAGE_SIZE, 'order': 'DESC'})

    def _entries(self, playlist_id, first_page_data, page):
        entries = first_page_data if page == 0 else self._get_page(playlist_id, page)
        for entry in entries.get('data', []):
            yield self.url_result(f"https://volej.tv/match/{entry['id']}", VolejTVIE)

    def _real_extract(self, url):
        playlist_id = self._match_id(url)
        title = self._call_api(f'team/show/{playlist_id}', playlist_id)['title']
        first_page_data = self._get_page(playlist_id, 0)
        total_pages = traverse_obj(first_page_data, ('meta', 'pageCount', {int}))
        return self.playlist_result(InAdvancePagedList(
            functools.partial(self._entries, playlist_id, first_page_data),
            total_pages, self._PAGE_SIZE), playlist_id, title)


class VolejTVCategoryPlaylistIE(VolejTVClubPlaylistIE):
    IE_NAME = 'volejtv:category'
    _VALID_URL = r'https?://volej\.tv/kategorie/(?P<id>[^/$?]+)'
    _TESTS = [{
        'url': 'https://volej.tv/kategorie/chance-cesky-pohar',
        'info_dict': {
            'id': 'chance-cesky-pohar',
            'title': 'Chance Český pohár',
        },
        'playlist_mincount': 30,
    }]
    _PAGE_SIZE = 10


Review comment (suggestion):
```suggestion
        for entry in traverse_obj(entries, ('data', lambda _, v: v['id'])):
```

Code after:
            **traverse_obj(json_data, {
                'series': ('competition_name', {str}),
                'season': ('season', {str}),
                'timestamp': ('match_time', {unified_timestamp}),
                'categories': ('category', ('title'), {str}, filter, all, filter),
                'thumbnail': ('poster', {url_or_none}),
            }),
            'formats': formats,
        }

        teams = orderedSet(traverse_obj(json_data, ('teams', ..., 'shortcut', {str})))
        if len(teams) > 2 and 'FIN' in teams:
            teams.remove('FIN')

        data['title'] = join_nonempty(
            join_nonempty(*teams, delim='-'),
            strftime_or_none(data.get('timestamp'), '(%Y-%m-%d)'),
            delim=' ')

        return data


class VolejTVPlaylistBaseIE(VolejTVBaseIE):
    """Subclasses must set _API_FILTER, _PAGE_SIZE"""

    def _get_page(self, playlist_id, page):
        return self._call_api(
            f'match/{self._API_FILTER}/{playlist_id}', playlist_id,
            query={'page': page + 1, 'take': self._PAGE_SIZE, 'order': 'DESC'})

    def _entries(self, playlist_id, first_page_data, page):
        entries = first_page_data if page == 0 else self._get_page(playlist_id, page)
        for match_id in traverse_obj(entries, ('data', ..., 'id')):
            yield self.url_result(f'https://volej.tv/match/{match_id}', VolejTVIE)


class VolejTVClubPlaylistIE(VolejTVPlaylistBaseIE):
    IE_NAME = 'volejtv:club'
    _VALID_URL = r'https?://volej\.tv/klub/(?P<id>\d+)'
    _TESTS = [{
        'url': 'https://volej.tv/klub/1173',
        'info_dict': {
            'id': '1173',
            'title': 'VK Jihostroj České Budějovice',
        },
        'playlist_mincount': 30,
    }]
    _API_FILTER = 'by-team-id-paginated'
    _PAGE_SIZE = 6

    def _real_extract(self, url):