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

Code before:
            'url': '%s/video/%s/%d.mp4' % (self._CDN_BASE, video_id, quality),
        } for quality in data['quality']]

        self._sort_formats(formats)

        return {
            'id': video_id,
            'title': data['title'],
            'description': data['desc'],
            'uploader': data['channel']['name'],
            'channel_id': data['channelId'],
            'channel_url': 'https://banbye.com/channel/%s' % data['channelId'],
            'timestamp': unified_timestamp(data['publishedAt']),
            'duration': data['duration'],
            'tags': data['tags'],
            'formats': formats,
            'thumbnails': thumbnails,
            'like_count': data['likes'],
            'dislike_count': data['dislikes'],
            'view_count': data['views'],
            'comment_count': data['commentCount'],
        }


class BanByePlaylistIE(BanByeBaseIE):
    _VALID_URL = r'https?://(?:www\.)?banbye.com/(?:en/)?channel/[^/]+/?\?playlist=(?P<id>[^/?\#&]+)'
    _TESTS = [{
        'url': 'https://banbye.com/channel/ch_wrealu24?playlist=p_Ld82N6gBw_OJ',
        'info_dict': {
            'title': 'Krzysztof Karoń',
            'id': 'p_Ld82N6gBw_OJ',
        },
        'playlist_count': 9,
    }]

    def _real_extract(self, url):
        playlist_id = self._match_id(url)
        return self._extract_playlist(playlist_id)


Review comment (suggestion):
Same issue as the other one. URLs like:
```
https://banbye.com/channel/ch_wrealu24?a=1&playlist=p_Ld82N6gBw_OJ
```
should match

Code after:
            'id': f'{quality}p',
            'url': f'{self._CDN_BASE}/video/{video_id}/{quality}.webp',
        } for quality in [48, 96, 144, 240, 512, 1080]]
        formats = [{
            'format_id': f'http-{quality}p',
            'quality': quality,
            'url': f'{self._CDN_BASE}/video/{video_id}/{quality}.mp4',
        } for quality in data['quality']]

        self._sort_formats(formats)

        return {
            'id': video_id,
            'title': data.get('title'),
            'description': data.get('desc'),
            'uploader': traverse_obj(data, ('channel', 'name')),
            'channel_id': data.get('channelId'),
            'channel_url': format_field(data, 'channelId', 'https://banbye.com/channel/%s'),
            'timestamp': unified_timestamp(data.get('publishedAt')),
            'duration': data.get('duration'),
            'tags': data.get('tags'),
            'formats': formats,
            'thumbnails': thumbnails,
            'like_count': data.get('likes'),
            'dislike_count': data.get('dislikes'),
            'view_count': data.get('views'),
            'comment_count': data.get('commentCount'),
        }


class BanByeChannelIE(BanByeBaseIE):
    _VALID_URL = r'https?://(?:www\.)?banbye.com/(?:en/)?channel/(?P<id>\w+)'
    _TESTS = [{
        'url': 'https://banbye.com/channel/ch_wrealu24',
        'info_dict': {
            'title': 'wRealu24',
            'id': 'ch_wrealu24',
            'description': 'md5:da54e48416b74dfdde20a04867c0c2f6',
        },
        'playlist_mincount': 791,
    }, {
        'url': 'https://banbye.com/channel/ch_wrealu24?playlist=p_Ld82N6gBw_OJ',
        'info_dict': {
            'title': 'Krzysztof Karoń',
            'id': 'p_Ld82N6gBw_OJ',
        },
        'playlist_count': 9,
    }]
    _PAGE_SIZE = 100

    def _real_extract(self, url):