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

Code before:
    }]

    def _real_extract(self, url):
        video_id = self._match_id(url)
        webpage = self._download_webpage(url, video_id)
        info = self._parse_json(
            self._search_regex(r'window\.data\s=\s(\{.*\})\;', webpage, 'video info'),
            video_id, transform_source=js_to_json)
        video_url = traverse_obj(info, 'video_url', ('originVideoInfo', 'video_url'))
        if not video_url:
            raise ExtractorError('Video was deleted', expected=True)
        formats = [{
            'format_id': 'mp4-with-watermark',
            'url': video_url,
            'height': info.get('video_height'),
            'width': info.get('video_width'),
        }, {
            'format_id': 'mp4-without-watermark',
            'url': video_url.replace('_4', ''),
            'height': info.get('video_height'),
            'width': info.get('video_width'),
        }]
        self._sort_formats(formats)
        return {
            'id': video_id,
            'title': info.get('msgText') or f'likee video #{video_id}',
            'description': info.get('share_desc'),
            'view_count': int_or_none(info.get('video_count')),
            'like_count': int_or_none(info.get('likeCount')),
            'play_count': int_or_none(info.get('play_count')),
            'download_count': int_or_none(info.get('download_count')),
            'comment_count': int_or_none(info.get('comment_count')),
            'uploader': str_or_none(info.get('nick_name')),
            'uploader_id': str_or_none(info.get('likeeId')),
            'artist': str_or_none(traverse_obj(info, ('sound', 'owner_name'))),
            'timestamp': parse_iso8601(info.get('uploadDate')),
            'thumbnail': info.get('coverUrl'),
            'duration': int_or_none(traverse_obj(info, ('option_data', 'dur'))),
            'formats': formats,
        }


class LikeeUserIE(InfoExtractor):
    IE_NAME = 'likee:user'
    _VALID_URL = r'https?://(www\.)?likee\.video/(?P<id>[^/]+)/?$'
    _TESTS = [{
        'url': 'https://likee.video/@fernanda_rivasg',
        'info_dict': {
            'id': '925638334',
            'title': 'fernanda_rivasg',
        },

Review comment (suggestion):
```suggestion
            'title': info.get('msgText')',
```

Code after:
    }, {
        'url': 'https://www.likee.video/@649222262/video/7093167848050058862',
        'only_matching': True,
    }, {
        'url': 'https://www.likee.video/v/k6QcOp',
        'only_matching': True,
    }]

    def _real_extract(self, url):
        video_id = self._match_id(url)
        webpage = self._download_webpage(url, video_id)
        info = self._parse_json(
            self._search_regex(r'window\.data\s=\s({.+?});', webpage, 'video info'),
            video_id, transform_source=js_to_json)
        video_url = traverse_obj(info, 'video_url', ('originVideoInfo', 'video_url'))
        if not video_url:
            self.raise_no_formats('Video was deleted', expected=True)
        formats = [{
            'format_id': 'mp4-with-watermark',
            'url': video_url,
            'height': info.get('video_height'),
            'width': info.get('video_width'),
        }, {
            'format_id': 'mp4-without-watermark',
            'url': video_url.replace('_4', ''),
            'height': info.get('video_height'),
            'width': info.get('video_width'),
            'quality': 1,
        }]
        self._sort_formats(formats)
        return {
            'id': video_id,
            'title': info.get('msgText'),
            'description': info.get('share_desc'),
            'view_count': int_or_none(info.get('video_count')),
            'like_count': int_or_none(info.get('likeCount')),
            'play_count': int_or_none(info.get('play_count')),
            'download_count': int_or_none(info.get('download_count')),
            'comment_count': int_or_none(info.get('comment_count')),
            'uploader': str_or_none(info.get('nick_name')),
            'uploader_id': str_or_none(info.get('likeeId')),
            'artist': str_or_none(traverse_obj(info, ('sound', 'owner_name'))),
            'timestamp': parse_iso8601(info.get('uploadDate')),
            'thumbnail': info.get('coverUrl'),
            'duration': int_or_none(traverse_obj(info, ('option_data', 'dur'))),
            'formats': formats,
        }


class LikeeUserIE(InfoExtractor):
    IE_NAME = 'likee:user'