ytdl-org/youtube-dl · error · ExtractorError

%s said: %s

Error message

%s said: %s

What it means

Raised by the Kaltura extractor when the multirequest API response's first object has objectType 'KalturaAPIException'. The exception's 'message' field from Kaltura's API is forwarded with the extractor name as prefix - typical messages are 'Access denied', 'Entry not found', or KS (session) errors.

Source

Thrown at youtube_dl/extractor/kaltura.py:185

            if service_mobj:
                url = smuggle_url(url, {'service_url': service_mobj.group('id')})
            urls.append(url)
        return urls

    def _kaltura_api_call(self, video_id, actions, service_url=None, *args, **kwargs):
        params = actions[0]
        if len(actions) > 1:
            for i, a in enumerate(actions[1:], start=1):
                for k, v in a.items():
                    params['%d:%s' % (i, k)] = v

        data = self._download_json(
            (service_url or self._SERVICE_URL) + self._SERVICE_BASE,
            video_id, query=params, *args, **kwargs)

        status = data if len(actions) == 1 else data[0]
        if status.get('objectType') == 'KalturaAPIException':
            raise ExtractorError(
                '%s said: %s' % (self.IE_NAME, status['message']))

        return data

    def _get_video_info(self, video_id, partner_id, service_url=None):
        actions = [
            {
                'action': 'null',
                'apiVersion': '3.1.5',
                'clientTag': 'kdp:v3.8.5',
                'format': 1,  # JSON, 2 = XML, 3 = PHP
                'service': 'multirequest',
            },
            {
                'expiry': 86400,
                'service': 'session',
                'action': 'startWidgetSession',
                'widgetId': '_%s' % partner_id,

View on GitHub (pinned to 956b8c5855)

Solutions

  1. Read the forwarded Kaltura message - it states the exact API rejection.
  2. Verify the embed URL is the original one from the page (partner id and entry id must match).
  3. For KS/session errors, re-extract from the fresh player page so a new session token is obtained.
  4. Update youtube-dl/yt-dlp for API version changes.
Defensive patterns

Strategy: try-catch

Try / catch

try:
    ydl.extract_info(kaltura_url)
except ExtractorError as e:
    msg = str(e)
    if 'not found' in msg or 'Access denied' in msg:
        skip_permanently(kaltura_url)
    elif 'KS' in msg or 'session' in msg.lower():
        refresh_page_and_retry(kaltura_url)  # obtain a new session

Prevention

When it happens

Trigger: A Kaltura partner API call (base <service_url>/api_v3/index.php?service=multirequest) where Kaltura rejects the request: invalid/expired KS session token, entry_id that does not exist for that partner_id, or lacking permissions for the requested flavors.

Common situations: Embed URLs copied from a different partner context (mismatched partner_id/entry_id), expired smuggled KS tokens, or access-controlled media on university/corporate Kaltura portals.

Related errors


AI-assisted analysis of ytdl-org/youtube-dl@956b8c5855 (2026-08-14). Data as JSON: /api/errors/eb12355c3d38ec92. Report an issue: GitHub.