{"record":{"id":"fe6e80f730d4106f","repo":"ytdl-org/youtube-dl","slug":"the-video-is-no-longer-available","errorCode":null,"errorMessage":"The video is no longer available","messagePattern":"The video is no longer available","errorType":"exception","errorClass":"ExtractorError","httpStatus":null,"severity":"error","filePath":"youtube_dl/extractor/rtve.py","lineNumber":151,"sourceCode":"            elif ext == 'mpd':\n                formats.extend(self._extract_mpd_formats(\n                    video_url, video_id, 'dash', fatal=False))\n            else:\n                formats.append({\n                    'format_id': quality,\n                    'quality': q(quality),\n                    'url': video_url,\n                })\n        self._sort_formats(formats)\n        return formats\n\n    def _real_extract(self, url):\n        video_id = self._match_id(url)\n        info = self._download_json(\n            'http://www.rtve.es/api/videos/%s/config/alacarta_videos.json' % video_id,\n            video_id)['page']['items'][0]\n        if info['state'] == 'DESPU':\n            raise ExtractorError('The video is no longer available', expected=True)\n        title = info['title'].strip()\n        formats = self._extract_png_formats(video_id)\n\n        subtitles = None\n        sbt_file = info.get('sbtFile')\n        if sbt_file:\n            subtitles = self.extract_subtitles(video_id, sbt_file)\n\n        is_live = info.get('live') is True\n\n        return {\n            'id': video_id,\n            'title': self._live_title(title) if is_live else title,\n            'formats': formats,\n            'thumbnail': info.get('image'),\n            'subtitles': subtitles,\n            'duration': float_or_none(info.get('duration'), 1000),\n            'is_live': is_live,","sourceCodeStart":133,"sourceCodeEnd":169,"githubUrl":"https://github.com/ytdl-org/youtube-dl/blob/956b8c585591b401a543e409accb163eeaaa1193/youtube_dl/extractor/rtve.py#L133-L169","documentation":"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.","triggerScenarios":"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).","commonSituations":"Old RTVE links whose rights expired; regional news clips unpublished after a period; archived playlists full of expired assets.","solutions":["Accept the takedown - the video is withdrawn by RTBE and not downloadable.","Check if RTVE republished it under a new URL and use that.","Prune 'DESPU' items from bulk jobs by querying the API state field first (see validation below)."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"import json, urllib.request\ndef rtve_published(video_id):\n    u = 'http://www.rtve.es/api/videos/%s/config/alacarta_videos.json' % video_id\n    with urllib.request.urlopen(u, timeout=10) as r:\n        info = json.load(r)['page']['items'][0]\n    return info.get('state') != 'DESPU'","typeGuard":null,"tryCatchPattern":"try:\n    ydl.extract_info(url)\nexcept ExtractorError as e:\n    if 'no longer available' in str(e):\n        skip(video_id)  # unpublished by RTVE, permanent\n    else:\n        raise","preventionTips":["Pre-check the API 'state' field for large RTVE batches (code above).","Expect RTVE documentary/series links to expire on rights windows - design jobs accordingly.","Do not retry DESPU items; the state only moves one way."],"tags":["rtve","unpublished","rights-expiry","expected-error"],"backgroundTag":null,"analyzedSha":"956b8c585591b401a543e409accb163eeaaa1193","analyzedAt":"2026-08-14T18:59:47.863Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}