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

Code before:

    def _real_extract(self, url):
        channel = self._match_id(url)
        response = self._call_api(f'v2/channels/{channel}', channel)
        if not traverse_obj(response, 'livestream', expected_type=dict):
            raise UserNotLive(video_id=channel)

        return {
            'id': str(traverse_obj(
                response, ('livestream', ('slug', 'id')), get_all=False, default=channel)),
            'formats': self._extract_m3u8_formats(
                response['playback_url'], channel, 'mp4', live=True),
            'title': traverse_obj(
                response, ('livestream', ('session_title', 'slug')), get_all=False, default=''),
            'description': traverse_obj(response, ('user', 'bio')),
            'channel': channel,
            'channel_id': int_or_none(traverse_obj(response, 'id', ('livestream', 'channel_id'))),
            'uploader': traverse_obj(response, 'name', ('user', 'username')),
            'uploader_id': int_or_none(traverse_obj(response, 'user_id', ('user', 'id'))),
            'is_live': True,
            'timestamp': unified_timestamp(traverse_obj(response, ('livestream', 'created_at'))),
            'thumbnail': traverse_obj(
                response, ('livestream', 'thumbnail', 'url'), expected_type=url_or_none),
            'categories': traverse_obj(response, ('recent_categories', ..., 'name')),
            'language': traverse_obj(
                response, ('livestream', ('language')), get_all=False, default=''),
        }


class KickVODIE(KickBaseIE):
    IE_NAME = 'kick:vods'
    _VALID_URL = r'https?://(?:www\.)?kick\.com/video/(?P<id>[\da-f]{8}-(?:[\da-f]{4}-){3}[\da-f]{12})'
    _TESTS = [{
        'url': 'https://kick.com/video/e74614f4-5270-4319-90ad-32179f19a45c',
        'md5': '3870f94153e40e7121a6e46c068b70cb',
        'info_dict': {
            'id': 'e74614f4-5270-4319-90ad-32179f19a45c',
            'ext': 'mp4',
            'title': '❎ MEGA DRAMA ❎ LIVE ❎ CLICK ❎ ULTIMATE SKILLS ❎ 100% JUICER ❎ GAMER EXTRAORDINAIRE ❎ TIME TO WIN ❎ AT EVERY SINGLE THING ❎ MUSCLES MASSIVE ❎ BRAIN HUGE ❎',
            'description': 'THE BEST AT ABSOLUTELY EVERYTHING. THE JUICER. LEADER OF THE JUICERS.',
            'channel': 'xqc',
            'channel_id': 668,
            'uploader': 'xQc',
            'uploader_id': 676,
            'upload_date': '20240724',
            'timestamp': 1721796562,
            'duration': 18566.0,
            'thumbnail': r're:^https?://.*\.jpg',
            'categories': ['VALORANT'],
        },
        'params': {

Review comment (suggestion):
language is a format field, shouldn't be returned here
```suggestion
```

Code after:
            'channel': channel,
            'is_live': True,
            'formats': self._extract_m3u8_formats(response['playback_url'], channel, 'mp4', live=True),
            **traverse_obj(response, {
                'id': ('livestream', 'slug', {str}),
                'title': ('livestream', 'session_title', {str}),
                'description': ('user', 'bio', {str}),
                'channel_id': (('id', ('livestream', 'channel_id')), {int}, {str_or_none}, any),
                'uploader': (('name', ('user', 'username')), {str}, any),
                'uploader_id': (('user_id', ('user', 'id')), {int}, {str_or_none}, any),
                'timestamp': ('livestream', 'created_at', {unified_timestamp}),
                'release_timestamp': ('livestream', 'start_time', {unified_timestamp}),
                'thumbnail': ('livestream', 'thumbnail', 'url', {url_or_none}),
                'categories': ('recent_categories', ..., 'name', {str}),
                'concurrent_view_count': ('livestream', 'viewer_count', {int_or_none}),
                'age_limit': ('livestream', 'is_mature', {bool}, {lambda x: 18 if x else 0}),
            }),
        }


class KickVODIE(KickBaseIE):
    IE_NAME = 'kick:vod'
    _VALID_URL = r'https?://(?:www\.)?kick\.com/video/(?P<id>[\da-f]{8}-(?:[\da-f]{4}-){3}[\da-f]{12})'
    _TESTS = [{
        'url': 'https://kick.com/video/e74614f4-5270-4319-90ad-32179f19a45c',
        'md5': '3870f94153e40e7121a6e46c068b70cb',
        'info_dict': {
            'id': 'e74614f4-5270-4319-90ad-32179f19a45c',
            'ext': 'mp4',
            'title': r're:❎ MEGA DRAMA ❎ LIVE ❎ CLICK ❎ ULTIMATE SKILLS .+',
            'description': 'THE BEST AT ABSOLUTELY EVERYTHING. THE JUICER. LEADER OF THE JUICERS.',
            'channel': 'xqc',
            'channel_id': '668',
            'uploader': 'xQc',
            'uploader_id': '676',
            'upload_date': '20240724',
            'timestamp': 1721796562,
            'duration': 18566.0,
            'thumbnail': r're:^https?://.*\.jpg',
            'view_count': int,
            'categories': ['VALORANT'],
            'age_limit': 0,
        },
        'params': {'skip_download': 'm3u8'},
    }]

    def _real_extract(self, url):
        video_id = self._match_id(url)
        response = self._call_api(f'v1/video/{video_id}', video_id)

        return {