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

Code before:
                'id': '31188385',
                'title': 'SERIA DRUGA',
            },
            'playlist_count': 13,
        },
        {
            'url': 'https://www.cda.pl/smiechawaTV/folder/2664592/vfilm',
            'info_dict': {
                'id': '2664592',
                'title': 'VideoDowcipy - wszystkie odcinki',
            },
            'playlist_count': 71,
        },
        {
            'url': 'https://www.cda.pl/DeliciousBeauty/folder/19129979/vfilm',
            'info_dict': {
                'id': '19129979',
                'title': 'TESTY KOSMETYKÓW',
            },
            'playlist_count': 139,
        }]

    def _real_extract(self, url):
        folder_id = self._match_id(url)
        channel_name = self._search_regex(
            r'cda\.pl/([^/]+)', url, 'channel name')

        webpage = self._download_webpage(url, folder_id)

        title = self._og_search_title(webpage)

        def extract_page_entries(channel_name, folder_id, page):
            url = f'https://www.cda.pl/{channel_name}/folder/{folder_id}/vfilm/{page+1}'
            webpage = self._download_webpage(url, folder_id, f'Extracting videos list from {url}')
            items = re.findall(r'<a[^>]+href="/video/([0-9a-z]+)" class=', webpage)
            for video_id in items:
                yield self.url_result(f'https://www.cda.pl/video/{video_id}', CDAIE.ie_key(), video_id)

        entries = OnDemandPagedList(
            functools.partial(extract_page_entries, channel_name, folder_id),
            self._MAX_PAGE_SIZE)

        return self.playlist_result(entries, folder_id, playlist_title=title)


Review comment (suggestion):
```suggestion
        folder_id, channel = self._match_valid_url(url).group('id', 'channel')
```

Code after:
            },
            'playlist_mincount': 13,
        },
        {
            'url': 'https://www.cda.pl/smiechawaTV/folder/2664592/vfilm',
            'info_dict': {
                'id': '2664592',
                'title': 'VideoDowcipy - wszystkie odcinki',
            },
            'playlist_mincount': 71,
        },
        {
            'url': 'https://www.cda.pl/DeliciousBeauty/folder/19129979/vfilm',
            'info_dict': {
                'id': '19129979',
                'title': 'TESTY KOSMETYKÓW',
            },
            'playlist_mincount': 139,
        }]

    def _real_extract(self, url):
        folder_id, channel = self._match_valid_url(url).group('id', 'channel')

        webpage = self._download_webpage(url, folder_id)

        def extract_page_entries(page):
            webpage = self._download_webpage(
                f'https://www.cda.pl/{channel}/folder/{folder_id}/vfilm/{page + 1}', folder_id,
                f'Downloading page {page + 1}', expected_status=404)
            items = re.findall(r'<a[^>]+href="/video/([0-9a-z]+)"', webpage)
            for video_id in items:
                yield self.url_result(f'https://www.cda.pl/video/{video_id}', CDAIE, video_id)

        return self.playlist_result(
            OnDemandPagedList(extract_page_entries, self._MAX_PAGE_SIZE),
            folder_id, self._og_search_title(webpage))