yt-dlp/yt-dlp · error · ExtractorError

{error}

Error message

{error}

What it means

Raised by the BBC extractor when the downloaded video page contains a player error banner instead of playable media. The extractor regexes the text of a <div> with class 'smp__message delta' or 'playout__message delta' (the BBC Standard Media Player's message area) and re-raises that scraped text verbatim as an ExtractorError with expected=True. The message you see is whatever the BBC page itself displays, e.g. 'This content is not available in your location' or a technical-fault notice.

Source

Thrown at yt_dlp/extractor/bbc.py:545

            if programme_id:
                formats, subtitles = self._download_media_selector(programme_id)
            else:
                formats, subtitles = self._process_media_selector(item, playlist_id)
                programme_id = playlist_id

        return programme_id, title, description, duration, formats, subtitles

    def _real_extract(self, url):
        group_id = self._match_id(url)

        webpage = self._download_webpage(url, group_id, 'Downloading video page')

        error = self._search_regex(
            r'<div\b[^>]+\bclass=["\'](?:smp|playout)__message delta["\'][^>]*>\s*([^<]+?)\s*<',
            webpage, 'error', default=None)
        if error:
            raise ExtractorError(error, expected=True)

        programme_id = None
        duration = None

        tviplayer = self._search_regex(
            r'mediator\.bind\(({.+?})\s*,\s*document\.getElementById',
            webpage, 'player', default=None)

        if tviplayer:
            player = self._parse_json(tviplayer, group_id).get('player', {})
            duration = int_or_none(player.get('duration'))
            programme_id = player.get('vpid')

        if not programme_id:
            programme_id = self._search_regex(
                rf'"vpid"\s*:\s*"({self._ID_REGEX})"', webpage, 'vpid', fatal=False, default=None)

        if programme_id:

View on GitHub (pinned to 81ecd58b13)

Solutions

  1. If the message mentions location/UK, retry through a UK proxy or VPN (e.g. --proxy).
  2. Open the URL in a browser and confirm the programme is still listed and playable; if the BBC page itself shows an error, the video is gone and no client fix applies.
  3. Update yt-dlp to the latest nightly (yt-dlp -U) so the message regex tracks current BBC markup.
  4. If the page plays fine in a browser but yt-dlp still fails, report the URL to the yt-dlp issue tracker so the extractor can be fixed.
Defensive patterns

Strategy: try-catch

Try / catch

try:
    info = ydl.extract_info(url, download=False)
except ExtractorError as e:
    if e.expected and ('location' in str(e) or 'available' in str(e)):
        log.info('BBC unavailable in region: %s', url)  # route via UK proxy or skip
    else:
        raise

Prevention

When it happens

Trigger: Downloading a BBC iPlayer/news/programme URL whose embedded player renders an error message div before any mediator.bind data; typical server-side causes are geo-restriction outside the UK, expired/removed programmes, or rights windows that have closed.

Common situations: Running yt-dlp from outside the UK without a UK proxy on an iPlayer URL; catching a programme that was taken down; BBC changing the smp/playout message markup so older yt-dlp versions no longer match (then you instead get a generic extract failure, so a matched message means the scrape itself still works).

Related errors


AI-assisted analysis of yt-dlp/yt-dlp@81ecd58b13 (2026-08-22). Data as JSON: /api/errors/cca573161c696750. Report an issue: GitHub.