{"record":{"id":"cca573161c696750","repo":"yt-dlp/yt-dlp","slug":"error","errorCode":null,"errorMessage":"{error}","messagePattern":"\\{error\\}","errorType":"exception","errorClass":"ExtractorError","httpStatus":null,"severity":"error","filePath":"yt_dlp/extractor/bbc.py","lineNumber":545,"sourceCode":"\n            if programme_id:\n                formats, subtitles = self._download_media_selector(programme_id)\n            else:\n                formats, subtitles = self._process_media_selector(item, playlist_id)\n                programme_id = playlist_id\n\n        return programme_id, title, description, duration, formats, subtitles\n\n    def _real_extract(self, url):\n        group_id = self._match_id(url)\n\n        webpage = self._download_webpage(url, group_id, 'Downloading video page')\n\n        error = self._search_regex(\n            r'<div\\b[^>]+\\bclass=[\"\\'](?:smp|playout)__message delta[\"\\'][^>]*>\\s*([^<]+?)\\s*<',\n            webpage, 'error', default=None)\n        if error:\n            raise ExtractorError(error, expected=True)\n\n        programme_id = None\n        duration = None\n\n        tviplayer = self._search_regex(\n            r'mediator\\.bind\\(({.+?})\\s*,\\s*document\\.getElementById',\n            webpage, 'player', default=None)\n\n        if tviplayer:\n            player = self._parse_json(tviplayer, group_id).get('player', {})\n            duration = int_or_none(player.get('duration'))\n            programme_id = player.get('vpid')\n\n        if not programme_id:\n            programme_id = self._search_regex(\n                rf'\"vpid\"\\s*:\\s*\"({self._ID_REGEX})\"', webpage, 'vpid', fatal=False, default=None)\n\n        if programme_id:","sourceCodeStart":527,"sourceCodeEnd":563,"githubUrl":"https://github.com/yt-dlp/yt-dlp/blob/81ecd58b1394793e6da9998cc19fdb45657f1685/yt_dlp/extractor/bbc.py#L527-L563","documentation":"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.","triggerScenarios":"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.","commonSituations":"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).","solutions":["If the message mentions location/UK, retry through a UK proxy or VPN (e.g. --proxy).","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.","Update yt-dlp to the latest nightly (yt-dlp -U) so the message regex tracks current BBC markup.","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."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    info = ydl.extract_info(url, download=False)\nexcept ExtractorError as e:\n    if e.expected and ('location' in str(e) or 'available' in str(e)):\n        log.info('BBC unavailable in region: %s', url)  # route via UK proxy or skip\n    else:\n        raise","preventionTips":["Provision UK egress for iPlayer jobs","Pre-check programme availability before queuing large BBC batches","Pin a recent yt-dlp version so the smp/playout message regex stays current"],"tags":["bbc","geo-restriction","html-scraping","expected-error","extractor"],"backgroundTag":"video-unavailable","analyzedSha":"81ecd58b1394793e6da9998cc19fdb45657f1685","analyzedAt":"2026-08-22T12:21:25.439Z","schemaVersion":2},"datasetVersion":"2026-08-22T14:17:55.899Z"}