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

Code before:
    }]

    def _real_extract(self, url):
        video_id = self._match_id(url)

        meta = self._weibo_download_json(
            'https://weibo.com/ajax/statuses/show', video_id, query={'id': video_id})
        mix_media_info = traverse_obj(meta, ('mix_media_info', 'items', ...))
        if not mix_media_info:
            return self._parse_video_info(meta)

        return self.playlist_result(self._entries(mix_media_info), video_id)

    def _entries(self, mix_media_info):
        for media_info in traverse_obj(mix_media_info, lambda _, v: v['type'] != 'pic'):
            yield self._parse_video_info(traverse_obj(media_info, {
                'id': ('data', 'object_id'),
                'page_info': {'media_info': ('data', 'media_info', {dict})},
            }))


class WeiboVideoIE(WeiboBaseIE):
    _VIDEO_ID_RE = r'\d+:(?:[\da-f]{32}|\d{16,})'
    _VALID_URL = [
        fr'https?://(?:www\.)?weibo\.com/tv/show/(?P<id>{_VIDEO_ID_RE})',
        fr'https?://video\.weibo\.com/show\?(?:[^#]+&)?fid=(?P<id>{_VIDEO_ID_RE})',
    ]
    _TESTS = [{
        'url': 'https://weibo.com/tv/show/1034:4797699866951785?from=old_pc_videoshow',
        'info_dict': {
            'id': '4797700463137878',
            'ext': 'mp4',
            'display_id': 'LEZDodaiW',
            'title': '呃，稍微了解了一下靡烟miya，感觉这东西也太二了',
            'alt_title': '呃，稍微了解了一下靡烟miya，感觉这东西也太二了',
            'description': '呃，稍微了解了一下靡烟miya，感觉这东西也太二了 http://t.cn/A6aerGsM \u200b\u200b\u200b',
            'duration': 76,
            'timestamp': 1659344278,
            'upload_date': '20220801',
            'thumbnail': r're:https://.*\.jpg',
            'uploader': '君子爱财陈平安',
            'uploader_id': '3905382233',
            'uploader_url': 'https://weibo.com/u/3905382233',
            'view_count': int,
            'like_count': int,
            'repost_count': int,
            '_old_archive_ids': ['weibomobile 4797700463137878'],
        },
    }, {
        'url': 'https://weibo.com/tv/show/1034:633c288cc043d0ca7808030f1157da64',
        'info_dict': {

Review comment (suggestion):
```suggestion
        fr'https?://video\.weibo\.com/show/?\?(?:[^#]+&)?fid=(?P<id>{_VIDEO_ID_RE})',
```

Code after:
    }]

    def _real_extract(self, url):
        video_id = self._match_id(url)

        meta = self._weibo_download_json(
            'https://weibo.com/ajax/statuses/show', video_id, query={'id': video_id})
        mix_media_info = traverse_obj(meta, ('mix_media_info', 'items', ...))
        if not mix_media_info:
            return self._parse_video_info(meta)

        return self.playlist_result(self._entries(mix_media_info), video_id)

    def _entries(self, mix_media_info):
        for media_info in traverse_obj(mix_media_info, lambda _, v: v['type'] != 'pic'):
            yield self._parse_video_info(traverse_obj(media_info, {
                'id': ('data', 'object_id'),
                'page_info': {'media_info': ('data', 'media_info', {dict})},
            }))


class WeiboVideoIE(WeiboBaseIE):
    _VIDEO_ID_RE = r'\d+:(?:[\da-f]{32}|\d{16,})'
    _VALID_URL = [
        fr'https?://(?:www\.)?weibo\.com/tv/show/(?P<id>{_VIDEO_ID_RE})',
        fr'https?://video\.weibo\.com/show/?\?(?:[^#]+&)?fid=(?P<id>{_VIDEO_ID_RE})',
    ]
    _TESTS = [{
        'url': 'https://weibo.com/tv/show/1034:4797699866951785?from=old_pc_videoshow',
        'info_dict': {
            'id': '4797700463137878',
            'ext': 'mp4',
            'display_id': 'LEZDodaiW',
            'title': '呃，稍微了解了一下靡烟miya，感觉这东西也太二了',
            'alt_title': '呃，稍微了解了一下靡烟miya，感觉这东西也太二了',
            'description': '呃，稍微了解了一下靡烟miya，感觉这东西也太二了 http://t.cn/A6aerGsM \u200b\u200b\u200b',
            'duration': 76,
            'timestamp': 1659344278,
            'upload_date': '20220801',
            'thumbnail': r're:https://.*\.jpg',
            'uploader': '君子爱财陈平安',
            'uploader_id': '3905382233',
            'uploader_url': 'https://weibo.com/u/3905382233',
            'view_count': int,
            'like_count': int,
            'repost_count': int,
            '_old_archive_ids': ['weibomobile 4797700463137878'],
        },
    }, {
        'url': 'https://weibo.com/tv/show/1034:633c288cc043d0ca7808030f1157da64',
        'info_dict': {