ytdl-org/youtube-dl · error · ExtractorError

The video is no longer available

Error message

The video is no longer available

What it means

Raised by the RTVE a la carta (Spain) extractor when the video metadata JSON from rtve.es/api/videos/<id>/config reports state == 'DESPU' (despublicado / unpublished). Expected=True: the broadcaster itself marks the video as no longer published.

Source

Thrown at youtube_dl/extractor/rtve.py:151

            elif ext == 'mpd':
                formats.extend(self._extract_mpd_formats(
                    video_url, video_id, 'dash', fatal=False))
            else:
                formats.append({
                    'format_id': quality,
                    'quality': q(quality),
                    'url': video_url,
                })
        self._sort_formats(formats)
        return formats

    def _real_extract(self, url):
        video_id = self._match_id(url)
        info = self._download_json(
            'http://www.rtve.es/api/videos/%s/config/alacarta_videos.json' % video_id,
            video_id)['page']['items'][0]
        if info['state'] == 'DESPU':
            raise ExtractorError('The video is no longer available', expected=True)
        title = info['title'].strip()
        formats = self._extract_png_formats(video_id)

        subtitles = None
        sbt_file = info.get('sbtFile')
        if sbt_file:
            subtitles = self.extract_subtitles(video_id, sbt_file)

        is_live = info.get('live') is True

        return {
            'id': video_id,
            'title': self._live_title(title) if is_live else title,
            'formats': formats,
            'thumbnail': info.get('image'),
            'subtitles': subtitles,
            'duration': float_or_none(info.get('duration'), 1000),
            'is_live': is_live,

View on GitHub (pinned to 956b8c5855)

Solutions

  1. Accept the takedown - the video is withdrawn by RTBE and not downloadable.
  2. Check if RTVE republished it under a new URL and use that.
  3. Prune 'DESPU' items from bulk jobs by querying the API state field first (see validation below).
Defensive patterns

Strategy: validation

Validate before calling

import json, urllib.request
def rtve_published(video_id):
    u = 'http://www.rtve.es/api/videos/%s/config/alacarta_videos.json' % video_id
    with urllib.request.urlopen(u, timeout=10) as r:
        info = json.load(r)['page']['items'][0]
    return info.get('state') != 'DESPU'

Try / catch

try:
    ydl.extract_info(url)
except ExtractorError as e:
    if 'no longer available' in str(e):
        skip(video_id)  # unpublished by RTVE, permanent
    else:
        raise

Prevention

When it happens

Trigger: Extracting an rtve.es/alacarta/videos/... URL whose API item has state 'DESPU' - typically content withdrawn after broadcast-rights expiry (RTVE removes many documentaries/series after a window).

Common situations: Old RTVE links whose rights expired; regional news clips unpublished after a period; archived playlists full of expired assets.

Related errors


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