ytdl-org/youtube-dl · error · ExtractorError

Episode %s is no longer available

Error message

Episode %s is no longer available

What it means

Sibling of error 45 in BBCCoUkIE._extract_from_legacy_playlist: the legacy EMP playlist XML has <noItems reason="postAvailability"/>, meaning the episode's media window has closed — it was available but the BBC has expired it (iPlayer items usually expire ~30 days after broadcast). Raised as expected=True with the playlist id interpolated.

Source

Thrown at youtube_dl/extractor/bbc.py:509

            'http://www.bbc.co.uk/iplayer/playlist/%s' % playlist_id, playlist_id)

    def _download_legacy_playlist_url(self, url, playlist_id=None):
        return self._download_xml(
            url, playlist_id, 'Downloading legacy playlist XML')

    def _extract_from_legacy_playlist(self, playlist, playlist_id):
        no_items = playlist.find('./{%s}noItems' % self._EMP_PLAYLIST_NS)
        if no_items is not None:
            reason = no_items.get('reason')
            if reason == 'preAvailability':
                msg = 'Episode %s is not yet available' % playlist_id
            elif reason == 'postAvailability':
                msg = 'Episode %s is no longer available' % playlist_id
            elif reason == 'noMedia':
                msg = 'Episode %s is not currently available' % playlist_id
            else:
                msg = 'Episode %s is not available: %s' % (playlist_id, reason)
            raise ExtractorError(msg, expected=True)

        for item in self._extract_items(playlist):
            kind = item.get('kind')
            if kind not in ('programme', 'radioProgramme'):
                continue
            title = playlist.find('./{%s}title' % self._EMP_PLAYLIST_NS).text
            description_el = playlist.find('./{%s}summary' % self._EMP_PLAYLIST_NS)
            description = description_el.text if description_el is not None else None

            def get_programme_id(item):
                def get_from_attributes(item):
                    for p in ('identifier', 'group'):
                        value = item.get(p)
                        if value and re.match(r'^[pb][\da-z]{7}$', value):
                            return value
                get_from_attributes(item)
                mediator = item.find('./{%s}mediator' % self._EMP_PLAYLIST_NS)
                if mediator is not None:

View on GitHub (pinned to 956b8c5855)

Solutions

  1. Accept the expiry: iPlayer content is time-limited; find the episode on DVD, BBC Store alternatives, or a re-broadcast.
  2. Check the series page for a repeated/re-uploaded version with a new programme id.
  3. For archiving workflows, extract episodes within their availability window rather than after.
  4. Treat as expected in callers (expected=True) and report 'expired' to users.
Defensive patterns

Strategy: try-catch

Try / catch

try:
    ydl.extract_info(episode_url)
except ExtractorError as e:
    if 'is no longer available' in str(e):
        mark_expired(episode_url)  # permanent; remove from queue, do not retry
    else:
        raise

Prevention

When it happens

Trigger: Extracting a BBC programme id past its availability window: the playlist endpoint returns noItems with reason 'postAvailability'. Common when following deep links to old episodes still listed on series pages.

Common situations: Archived forum/social links to episodes aired weeks ago; batch jobs iterating full series back-catalogues where early episodes have expired; assuming all listed episodes on a programme page are still playable.

Related errors


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