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

Code before:
            'title': 'cherokee - Mobile Clips',
        },
        'playlist_mincount': 1
    }]

    def _get_page(self, user_id, game, query_id, page_num):
        page_num += 1

        for video_data in self._send_query(
                _QUERIES.get(query_id), {
                    'user': user_id,
                    'page': page_num,
                    'game': int_or_none(game),
                }, ('data', 'videos', 'data'), f'{user_id} page {page_num}'):
            yield _set_webpage_url(_parse_video_data(video_data))

    def _get_user_data(self, user_id, path=()):
        return traverse_obj(
            self._download_json(
                urljoin('https://api.allstar.gg/v1/users/profile/', user_id),
                user_id), path)

    def _real_extract(self, url):
        user_id = self._match_id(url)
        user_id, user_name = self._get_user_data(
            user_id, ('data', ('_id', ('profile', 'username'))))
        url_query = parse_qs(url)
        game = traverse_obj(url_query, ('game', 0, {str_or_none}))
        view = traverse_obj(url_query, ('view', 0, {str_or_none}), default='Clips')
        query_id = view.lower()

        if query_id not in ('clips', 'montages', 'mobile clips'):
            raise UnsupportedError(f'view={view}')

        assert query_id in _QUERIES

        return self.playlist_result(
            OnDemandPagedList(
                functools.partial(
                    self._get_page, user_id, game, query_id), _PAGESIZE),
            user_id, f'{user_name} - {view}')


Review comment (suggestion):
This is fatal right now in case either of them is renamed, while only `user_id` is required.
I would also suggest keeping the original id as the `display_id`.

Code after:
        for video_data in self._call_api(
                query, {
                    'user': user_id,
                    'page': page_num,
                    'game': game,
                }, ('data', 'videos', 'data'), display_id, f'Downloading page {page_num}'):
            yield self._parse_video_data(video_data)

    def _real_extract(self, url):
        display_id = self._match_id(url)
        profile_data = self._download_json(
            urljoin('https://api.allstar.gg/v1/users/profile/', display_id), display_id)
        user_id = traverse_obj(profile_data, ('data', ('_id'), {str}))
        if not user_id:
            raise ExtractorError('Unable to extract the user id')

        username = traverse_obj(profile_data, ('data', 'profile', ('username'), {str}))
        url_query = parse_qs(url)
        game = traverse_obj(url_query, ('game', 0, {int_or_none}))
        query_id = traverse_obj(url_query, ('view', 0), default='Clips')

        if query_id not in ('Clips', 'Montages', 'Mobile Clips'):
            raise ExtractorError(f'Unsupported playlist URL type {query_id!r}')

        return self.playlist_result(
            OnDemandPagedList(
                functools.partial(
                    self._get_page, user_id, display_id, game, _QUERIES.get(query_id)), self._PAGE_SIZE),
            playlist_id=join_nonempty(user_id, query_id.lower().split()[0], game),
            playlist_title=join_nonempty((username or display_id), query_id, game, delim=' - '))