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

Code before:
    }, {
        'url': 'https://videos.cncf.io/topic/kubernetes/video/YAM2d7yTrrI',
        'only_matching': True,
    }, {
        'url': 'https://videos.icts.res.in/video/d7HuP_abpKU',
        'only_matching': True,
    }]

    def _real_extract(self, url):
        hostname, video_id = self._match_valid_url(url).group('host', 'id')
        org_id, _ = self._get_org_id_and_api_key(self._ORGANIZATIONS[hostname], video_id)
        details = self._download_json(
            'https://analytics.videoken.com/api/embedded/videodetails/', video_id, query={
                'video': video_id,
                'org_id': org_id,
            }, headers={'Accept': 'application/json'}, note='Downloading API JSON')

        embed_type = details['type']
        ie_key = None
        if embed_type == 'youtube':
            embed_url = video_id
            ie_key = 'Youtube'
        else:
            embed_url = details['embed_url']
            if urllib.parse.urlparse(embed_url).netloc == 'slideslive.com':
                ie_key = 'SlidesLive'
                embed_url = self._create_slideslive_url(embed_url, video_id, url)

        return self.url_result(embed_url, ie_key, video_id)


class VideoKenPlayerIE(VideoKenBaseIE):
    _VALID_URL = r'https?://player\.videoken\.com/embed/slideslive-(?P<id>\d+)'
    _TESTS = [{
        'url': 'https://player.videoken.com/embed/slideslive-38968434',
        'info_dict': {
            'id': '38968434',
            'ext': 'mp4',
            'title': 'Deep Learning with Label Differential Privacy',
            'timestamp': 1643377020,
            'upload_date': '20220128',
            'thumbnail': r're:^https?://.*\.(?:jpg|png)',
            'thumbnails': 'count:30',
            'chapters': 'count:29',
        },
        'params': {
            'skip_download': 'm3u8',
        },
    }]

    def _real_extract(self, url):

Review comment (suggestion):
```suggestion
                ie_key = SlidesLiveIE
```
is better imo

Code after:
            'skip_download': 'm3u8',
        },
    }, {
        'url': 'https://videos.cncf.io/category/478/video/IL4nxbmUIX8',
        'only_matching': True,
    }, {
        'url': 'https://videos.cncf.io/topic/kubernetes/video/YAM2d7yTrrI',
        'only_matching': True,
    }, {
        'url': 'https://videos.icts.res.in/video/d7HuP_abpKU',
        'only_matching': True,
    }]

    def _real_extract(self, url):
        hostname, video_id = self._match_valid_url(url).group('host', 'id')
        org_id, _ = self._get_org_id_and_api_key(self._ORGANIZATIONS[hostname], video_id)
        details = self._download_json(
            'https://analytics.videoken.com/api/videoinfo_private', video_id, query={
                'videoid': video_id,
                'org_id': org_id,
            }, headers={'Accept': 'application/json'}, note='Downloading VideoKen API JSON',
            errnote='Failed to download VideoKen API JSON', fatal=False)
        if details:
            return next(self._extract_videos({'videos': [details]}, url))
        # fallback for API error 400 response
        elif video_id.startswith('slideslive-'):
            return self.url_result(
                self._create_slideslive_url(None, video_id, url), SlidesLiveIE, video_id)
        elif re.match(r'^[\w-]{11}$', video_id):
            self.url_result(video_id, 'Youtube', video_id)
        else:
            raise ExtractorError('Unable to extract without VideoKen API response')


class VideoKenPlayerIE(VideoKenBaseIE):
    _VALID_URL = r'https?://player\.videoken\.com/embed/slideslive-(?P<id>\d+)'
    _TESTS = [{
        'url': 'https://player.videoken.com/embed/slideslive-38968434',
        'info_dict': {
            'id': '38968434',
            'ext': 'mp4',
            'title': 'Deep Learning with Label Differential Privacy',
            'timestamp': 1643377020,
            'upload_date': '20220128',
            'thumbnail': r're:^https?://.*\.(?:jpg|png)',
            'thumbnails': 'count:30',
            'chapters': 'count:29',
        },
        'params': {
            'skip_download': 'm3u8',
        },