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

Code before:
            },
            '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)

        webpage = self._download_webpage(url, folder_id)

        title = self._html_search_meta('og:title', webpage, 'title')

        def extract_page_entries(url):
            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)
            page_entries = []
            for video_id in items:
                self.to_screen(f'Extracting {video_id}')
                self.url_result(f'https://www.cda.pl{video_id}', CDAIE.ie_key())
                page_entries.append(self.url_result(f'https://www.cda.pl/video/{video_id}', CDAIE.ie_key(), video_id))
            # Find max page number from html:
            # <a href="https://www.cda.pl/CHANNEL_NAME/folder/FOLDER_ID/vfilm/MAX_NUM" class="next">&gt;<
            next_page_number = int_or_none(self._html_search_regex(
                r'<a[^>]+href="https://www.cda.pl/[^/]+/folder/[^/]+/vfilm/(?P<page>\d+)" class="next">&gt;<',
                webpage, 'page count', default=None))

            return page_entries, next_page_number

        entries, next_page = extract_page_entries(url)
        while next_page is not None and next_page < self._MAX_PAGE_NUMBER:
            page_entries, next_page = extract_page_entries(f'{url}/{next_page}')
            entries.extend(page_entries)

        return self.playlist_result(entries, folder_id, title)


Review comment (suggestion):
```suggestion
        title = self._og_search_title(webpage)
```

Code after:
                'title': 'SERIA DRUGA',
            },
            '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))