{"record":{"id":"8066a0a26df978f2","repo":"ytdl-org/youtube-dl","slug":"episode-s-is-no-longer-available","errorCode":null,"errorMessage":"Episode %s is no longer available","messagePattern":"Episode (.+?) is no longer available","errorType":"exception","errorClass":"ExtractorError","httpStatus":null,"severity":"error","filePath":"youtube_dl/extractor/bbc.py","lineNumber":509,"sourceCode":"            'http://www.bbc.co.uk/iplayer/playlist/%s' % playlist_id, playlist_id)\n\n    def _download_legacy_playlist_url(self, url, playlist_id=None):\n        return self._download_xml(\n            url, playlist_id, 'Downloading legacy playlist XML')\n\n    def _extract_from_legacy_playlist(self, playlist, playlist_id):\n        no_items = playlist.find('./{%s}noItems' % self._EMP_PLAYLIST_NS)\n        if no_items is not None:\n            reason = no_items.get('reason')\n            if reason == 'preAvailability':\n                msg = 'Episode %s is not yet available' % playlist_id\n            elif reason == 'postAvailability':\n                msg = 'Episode %s is no longer available' % playlist_id\n            elif reason == 'noMedia':\n                msg = 'Episode %s is not currently available' % playlist_id\n            else:\n                msg = 'Episode %s is not available: %s' % (playlist_id, reason)\n            raise ExtractorError(msg, expected=True)\n\n        for item in self._extract_items(playlist):\n            kind = item.get('kind')\n            if kind not in ('programme', 'radioProgramme'):\n                continue\n            title = playlist.find('./{%s}title' % self._EMP_PLAYLIST_NS).text\n            description_el = playlist.find('./{%s}summary' % self._EMP_PLAYLIST_NS)\n            description = description_el.text if description_el is not None else None\n\n            def get_programme_id(item):\n                def get_from_attributes(item):\n                    for p in ('identifier', 'group'):\n                        value = item.get(p)\n                        if value and re.match(r'^[pb][\\da-z]{7}$', value):\n                            return value\n                get_from_attributes(item)\n                mediator = item.find('./{%s}mediator' % self._EMP_PLAYLIST_NS)\n                if mediator is not None:","sourceCodeStart":491,"sourceCodeEnd":527,"githubUrl":"https://github.com/ytdl-org/youtube-dl/blob/956b8c585591b401a543e409accb163eeaaa1193/youtube_dl/extractor/bbc.py#L491-L527","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Accept the expiry: iPlayer content is time-limited; find the episode on DVD, BBC Store alternatives, or a re-broadcast.","Check the series page for a repeated/re-uploaded version with a new programme id.","For archiving workflows, extract episodes within their availability window rather than after.","Treat as expected in callers (expected=True) and report 'expired' to users."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    ydl.extract_info(episode_url)\nexcept ExtractorError as e:\n    if 'is no longer available' in str(e):\n        mark_expired(episode_url)  # permanent; remove from queue, do not retry\n    else:\n        raise","preventionTips":["Extract iPlayer episodes within their ~30-day window; archive promptly after broadcast.","Prune old deep links from crawl queues instead of re-trying them nightly.","Treat postAvailability as permanent — retrying never helps."],"tags":["bbc","availability","expired","legacy-playlist","extractor"],"backgroundTag":null,"analyzedSha":"956b8c585591b401a543e409accb163eeaaa1193","analyzedAt":"2026-08-14T18:59:47.863Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}