{"record":{"id":"c8d416c7eac7e667","repo":"ytdl-org/youtube-dl","slug":"error","errorCode":null,"errorMessage":"error","messagePattern":"error","errorType":"exception","errorClass":"ExtractorError","httpStatus":null,"severity":"error","filePath":"youtube_dl/extractor/bbc.py","lineNumber":550,"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                r'\"vpid\"\\s*:\\s*\"(%s)\"' % self._ID_REGEX, webpage, 'vpid', fatal=False, default=None)\n\n        if programme_id:","sourceCodeStart":532,"sourceCodeEnd":568,"githubUrl":"https://github.com/ytdl-org/youtube-dl/blob/956b8c585591b401a543e409accb163eeaaa1193/youtube_dl/extractor/bbc.py#L532-L568","documentation":"Raised at the top of BBCCoUkIE._real_extract: after downloading the programme webpage, the extractor searches for a div with class 'smp__message delta' or 'playout__message delta' — the media player's inline notice area. If text is found there (e.g. 'This content is no longer available' or a geo notice), that raw text is re-raised verbatim as an expected ExtractorError. The generic message name 'error' in listings is just the _search_regex field label.","triggerScenarios":"Any BBC programme page whose HTML contains a populated (smp|playout)__message delta div — the site's own way of saying the player cannot show media: expired episodes, geo blocks, or broken embeds. The regex captures the div's inner text and raises it.","commonSituations":"Following deep links to expired iPlayer episodes; non-UK IPs hitting geo notices rendered in the player message area; pages where the programme was replaced by a notice ('coming soon'); the CSS class renamed by a BBC redesign causing the regex to over/under-match.","solutions":["Read the raised message text — it is BBC's own player notice and states the actual cause (expiry, geo, etc.).","For geo messages, retry from a UK IP.","For expiry messages, look for a newer episode id on the series page.","If the regex starts matching unrelated page copy after a redesign, tighten the pattern at bbc.py:550 and report upstream."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"import re, requests\n\ndef bbc_page_shows_player_error(url):\n    html = requests.get(url).text\n    m = re.search(r'<div\\b[^>]+\\bclass=[\"\\'](?:smp|playout)__message delta[\"\\'][^>]*>\\s*([^<]+?)\\s*<', html)\n    return m.group(1) if m else None","typeGuard":null,"tryCatchPattern":"try:\n    ydl.extract_info(url)\nexcept ExtractorError as e:\n    msg = str(e)\n    if 'only available' in msg or 'not available' in msg:\n        show_user(msg)  # it's the BBC player's own notice; relay verbatim\n    else:\n        raise","preventionTips":["Pre-check the programme page for the smp/playout__message div before extraction.","Relay the raised text to users — it is the site's own availability notice.","For geo notices, retry from a UK IP rather than treating as permanent."],"tags":["bbc","player-message","availability","webpage-scraping","extractor"],"backgroundTag":null,"analyzedSha":"956b8c585591b401a543e409accb163eeaaa1193","analyzedAt":"2026-08-14T18:59:47.863Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}