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

Code before:
        'url': 'https://ecchi.iwara.tv/users/theblackbirdcalls',
        'info_dict': {
            'title': 'Uploaded videos from TheBlackbirdCalls',
            'id': 'theblackbirdcalls',
            'uploader': 'TheBlackbirdCalls',
            'uploader_id': 'theblackbirdcalls',
        },
        'playlist_mincount': 420,
    }, {
        # cond: foreign chars in URL
        'note': 'foreign chars in URL',
        'url': 'https://ecchi.iwara.tv/users/ぶた丼',
        'info_dict': {
            'title': 'Uploaded videos from ぶた丼',
            'id': 'ぶた丼',
            'uploader': 'ぶた丼',
            'uploader_id': 'ぶた丼',
        },
        'playlist_mincount': 170,
    }]

    def _entries(self, playlist_id, base_url):
        # we first probe users' profile page for existence of More videos page
        webpage = self._download_webpage(
            f'{base_url}/users/{playlist_id}', playlist_id)
        videos_url = self._search_regex(r'<a href="(/users/[^/]+/videos)(?:\?[^"]*)?">', webpage, 'all videos url', default=None)
        if not videos_url:
            # if not, we already know all videos
            yield from self._extract_playlist(base_url, webpage)
            return

        videos_url = urljoin(base_url, videos_url)

        # let's proceed with paging
        for n in itertools.count(1):
            page = self._download_webpage(
                videos_url, playlist_id, note=f'Downloading playlist page {n}',
                query={'page': str(n - 1)} if n > 1 else {})
            yield from self._extract_playlist(
                base_url, page)

            if f'page={n}' not in page:
                # stop if there are no more pages
                break

    def _real_extract(self, url):
        playlist_id, base_url = self._match_valid_url(url).group('id', 'base_url')
        playlist_id = urllib.parse.unquote(playlist_id)

        return self.playlist_result(
            self._entries(playlist_id, base_url), playlist_id)

Review comment (suggestion):
```suggestion
        videos_url = self._search_regex(r'<a href="(/users/[^/]+/videos)(?:\?[^"]*+)?">', webpage, 'all videos url', default=None)
```

Code after:
            'id': 'theblackbirdcalls',
            'uploader': 'TheBlackbirdCalls',
            'uploader_id': 'theblackbirdcalls',
        },
        'playlist_mincount': 420,
    }, {
        'note': 'foreign chars in URL. there must be foreign characters in URL',
        'url': 'https://ecchi.iwara.tv/users/ぶた丼',
        'info_dict': {
            'title': 'Uploaded videos from ぶた丼',
            'id': 'ぶた丼',
            'uploader': 'ぶた丼',
            'uploader_id': 'ぶた丼',
        },
        'playlist_mincount': 170,
    }]

    def _entries(self, playlist_id, base_url):
        webpage = self._download_webpage(
            f'{base_url}/users/{playlist_id}', playlist_id)
        videos_url = self._search_regex(r'<a href="(/users/[^/]+/videos)(?:\?[^"]+)?">', webpage, 'all videos url', default=None)
        if not videos_url:
            yield from self._extract_playlist(base_url, webpage)
            return

        videos_url = urljoin(base_url, videos_url)

        for n in itertools.count(1):
            page = self._download_webpage(
                videos_url, playlist_id, note=f'Downloading playlist page {n}',
                query={'page': str(n - 1)} if n > 1 else {})
            yield from self._extract_playlist(
                base_url, page)

            if f'page={n}' not in page:
                break

    def _real_extract(self, url):
        playlist_id, base_url = self._match_valid_url(url).group('id', 'base_url')
        playlist_id = urllib.parse.unquote(playlist_id)

        return self.playlist_result(
            self._entries(playlist_id, base_url), playlist_id)