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

Code before:
        first_page = fetch_page(0)
        metadata = get_metadata(first_page)

        paged_list = InAdvancePagedList(
            lambda idx: get_entries(fetch_page(idx) if idx else first_page),
            metadata['page_count'], metadata['page_size'])

        return metadata, paged_list


class BilibiliSpaceVideoIE(BilibiliSpaceBaseIE):
    _VALID_URL = r'https?://space\.bilibili\.com/(?P<id>\d+)(?P<video>(?:/upload)?/video)?/?(?:[?#]|$)'
    _TESTS = [{
        'url': 'https://space.bilibili.com/3985676/video',
        'info_dict': {
            'id': '3985676',
        },
        'playlist_mincount': 178,
    }, {
        'url': 'https://space.bilibili.com/313580179/video',
        'info_dict': {
            'id': '313580179',
        },
        'playlist_mincount': 92,
    }, {
        'url': 'https://space.bilibili.com/3669403/video',
        'info_dict': {
            'id': '3669403',
        },
        'playlist': [{
            'info_dict': {
                '_type': 'playlist',
                'id': '3669403_3958082',
                'title': '合集·直播回放',
                'description': '',
                'uploader': '月路Yuel',
                'uploader_id': '3669403',
                'timestamp': int,
                'upload_date': str,
                'thumbnail': str,
            },
        }],
        'params': {'playlist_items': '7'},
    }]

    def _real_extract(self, url):
        playlist_id, is_video_url = self._match_valid_url(url).group('id', 'video')
        if not is_video_url:
            self.to_screen('A channel URL was given. Only the channel\'s videos will be downloaded. '
                           'To download audios, add a "/upload/audio" to the URL')


Review comment (suggestion):
```suggestion
    }, {
        # Hidden-mode collection
        'url': 'https://space.bilibili.com/3669403/video',
```

Code after:
        first_page = fetch_page(0)
        metadata = get_metadata(first_page)

        paged_list = InAdvancePagedList(
            lambda idx: get_entries(fetch_page(idx) if idx else first_page),
            metadata['page_count'], metadata['page_size'])

        return metadata, paged_list


class BilibiliSpaceVideoIE(BilibiliSpaceBaseIE):
    _VALID_URL = r'https?://space\.bilibili\.com/(?P<id>\d+)(?P<video>(?:/upload)?/video)?/?(?:[?#]|$)'
    _TESTS = [{
        'url': 'https://space.bilibili.com/3985676/video',
        'info_dict': {
            'id': '3985676',
        },
        'playlist_mincount': 178,
    }, {
        'url': 'https://space.bilibili.com/313580179/video',
        'info_dict': {
            'id': '313580179',
        },
        'playlist_mincount': 92,
    }, {
        # Hidden-mode collection
        'url': 'https://space.bilibili.com/3669403/video',
        'info_dict': {
            'id': '3669403',
        },
        'playlist': [{
            'info_dict': {
                '_type': 'playlist',
                'id': '3669403_3958082',
                'title': '合集·直播回放',
                'description': '',
                'uploader': '月路Yuel',
                'uploader_id': '3669403',
                'timestamp': int,
                'upload_date': str,
                'thumbnail': str,
            },
        }],
        'params': {'playlist_items': '7'},
    }]

    def _real_extract(self, url):
        playlist_id, is_video_url = self._match_valid_url(url).group('id', 'video')
        if not is_video_url:
            self.to_screen('A channel URL was given. Only the channel\'s videos will be downloaded. '
                           'To download audios, add a "/upload/audio" to the URL')