ytdl-org/youtube-dl · error · ExtractorError

Video %s is no longer available

Error message

Video %s is no longer available

What it means

Raised by SRMediathekIE when the SR-Mediathek (saechsischer Rundfunk) page for the matched video id contains the marker text '>Der gew&uuml;nschte Beitrag ist leider nicht mehr verf&uuml;gbar.<' ('The desired contribution is unfortunately no longer available'). It is marked expected=True, so youtube-dl treats it as a known site condition rather than a bug. The video was taken down by the broadcaster.

Source

Thrown at youtube_dl/extractor/srmediathek.py:48

            'ext': 'mp4',
            'title': 'Love, Cakes and Rock\'n\'Roll',
            'description': 'md5:18bf9763631c7d326c22603681e1123d',
        },
        'params': {
            # m3u8 download
            'skip_download': True,
        },
    }, {
        'url': 'http://sr-mediathek.de/index.php?seite=7&id=7480',
        'only_matching': True,
    }]

    def _real_extract(self, url):
        video_id = self._match_id(url)
        webpage = self._download_webpage(url, video_id)

        if '>Der gew&uuml;nschte Beitrag ist leider nicht mehr verf&uuml;gbar.<' in webpage:
            raise ExtractorError('Video %s is no longer available' % video_id, expected=True)

        media_collection_url = self._search_regex(
            r'data-mediacollection-ardplayer="([^"]+)"', webpage, 'media collection url')
        info = self._extract_media_info(media_collection_url, webpage, video_id)
        info.update({
            'id': video_id,
            'title': get_element_by_attribute('class', 'ardplayer-title', webpage),
            'description': self._og_search_description(webpage),
            'thumbnail': self._og_search_thumbnail(webpage),
        })
        return info

View on GitHub (pinned to 956b8c5855)

Solutions

  1. Accept that the video is gone: the content was removed server-side, no client change recovers it.
  2. Find the same content on the current ARD Mediathek (ardmediathek.de) or the broadcaster's YouTube mirror and use that URL instead.
  3. If running a bulk job, catch ExtractorError and check .expected / the message to skip dead entries instead of aborting the whole playlist.

Example fix

# before: dead link aborts a batch download
# after: skip expected unavailability errors
try:
    ydl.extract_info(url, download=True)
except ExtractorError as e:
    if e.expected and 'no longer available' in str(e):
        log.warning('skipping dead video: %s', url)
    else:
        raise
Defensive patterns

Strategy: try-catch

Validate before calling

# Pre-check availability marker on the page (mirror of extractor logic)
import re
from youtube_dl.utils import int_or_none  # not needed; keep deps minimal
page = ydl.urlopen('http://sr-mediathek.de/index.php?seite=7&id=%s' % vid).read().decode('utf-8', 'replace')
if '>Der gew&uuml;nschte Beitrag ist leider nicht mehr verf&uuml;gbar.<' in page:
    print('skip: taken down')

Try / catch

try:
    info = ydl.extract_info(url)
except ExtractorError as e:
    if e.expected and 'no longer available' in str(e):
        continue  # dead broadcaster video, skip
    raise

Prevention

When it happens

Trigger: Calling the extractor with a URL like http://sr-mediathek.de/index.php?seite=7&id=<id> where the downloaded webpage contains that German unavailability marker (HTML-escaped).

Common situations: Users downloading old ARD/SR media library links whose content expired; test URLs in playlists that have rotted since the extractor was written.

Related errors


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