ytdl-org/youtube-dl · error · ExtractorError

Episode %s is not yet available

Error message

Episode %s is not yet available

What it means

One of four sibling availability errors from BBCCoUkIE._extract_from_legacy_playlist. When the legacy EMP playlist XML contains a noItems element whose reason attribute equals 'preAvailability', the episode exists but its media window has not opened yet, so the extractor raises 'Episode %s is not yet available' (expected=True) with the playlist id.

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. Wait until the episode's scheduled broadcast/publication time has passed (BBC backend time, UK timezone), then retry.
  2. Check the episode page in a browser — a 'coming soon' badge confirms preAvailability.
  3. In automation, schedule the retry around the UK air time rather than retrying immediately.
  4. Confirm you are using the right programme id; a wrong id more often yields selectionunavailable instead.
Defensive patterns

Strategy: retry

Try / catch

try:
    ydl.extract_info(episode_url)
except ExtractorError as e:
    if 'is not yet available' in str(e):
        schedule_retry(episode_url, at=uk_airtime_plus_margin)  # retry after UK broadcast
    else:
        raise

Prevention

When it happens

Trigger: Extracting a BBC programme id whose legacy playlist XML returns <noItems reason="preAvailability"/> — i.e. the broadcast/publication time is in the future. Typically hit when scraping a programme page for an announced-but-unaired episode.

Common situations: Automated nightly jobs that walk a series feed and reach episodes scheduled for later in the week; clock/timezone confusion making an episode look aired when the BBC backend (UTC) still considers it pre-availability; pages listing upcoming episodes with playable-looking URLs.

Related errors


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