{"record":{"id":"eaeff9256d374dd7","repo":"ytdl-org/youtube-dl","slug":"item-not-found-in-collection","errorCode":null,"errorMessage":"Item not found in collection","messagePattern":"Item not found in collection","errorType":"exception","errorClass":"ExtractorError","httpStatus":null,"severity":"error","filePath":"youtube_dl/extractor/orf.py","lineNumber":234,"sourceCode":"            'https://collector.orf.at/api/frontend/collections/{0}?_o=sound.orf.at'.format(\n                coll_id), coll_id)\n        data = self._get_api_payload(data, coll_id, in_payload=True)\n\n        def yield_items():\n            for item in traverse_obj(data, (\n                    'content', 'items', lambda _, v: any(k in v['target']['params'] for k in self._ID_NAMES))):\n                if item_id is None or item_id == txt_or_none(item.get('id')):\n                    target = item['target']\n                    typed_item_id = self._get_item_id(target['params'])\n                    station = target['params'].get('station')\n                    item_type = target.get('type')\n                    if typed_item_id and (station or item_type):\n                        yield station, typed_item_id, item_type\n                    if item_id is not None:\n                        break\n            else:\n                if item_id is not None:\n                    raise ExtractorError('Item not found in collection',\n                                         video_id=coll_id, expected=True)\n\n        def item_playlist(station, typed_item_id, item_type):\n            if item_type == 'upload':\n                item_data = self._download_json('https://audioapi.orf.at/radiothek/api/2.0/upload/{0}?_o=sound.orf.at'.format(\n                    typed_item_id), typed_item_id)\n            elif item_type == 'podcast-episode':\n                item_data = self._download_json('https://audioapi.orf.at/radiothek/api/2.0/episode/{0}?_o=sound.orf.at'.format(\n                    typed_item_id), typed_item_id)\n            else:\n                api_station, _, _ = self.STATION_INFO[station]\n                item_data = self._download_json(\n                    'https://audioapi.orf.at/{0}/api/json/5.0/{1}/{2}?_o=sound.orf.at'.format(\n                        api_station, item_type or 'broadcastitem', typed_item_id), typed_item_id)\n\n            item_data = self._get_api_payload(item_data, typed_item_id, in_payload=True)\n\n            return merge_dicts(","sourceCodeStart":216,"sourceCodeEnd":252,"githubUrl":"https://github.com/ytdl-org/youtube-dl/blob/956b8c585591b401a543e409accb163eeaaa1193/youtube_dl/extractor/orf.py#L216-L252","documentation":"Raised by ORFRadiothekIE (ORF Radiothek collection extractor) when a specific item_id was requested from a station/collection but no matching item was found in the API's 'content/items' list. It is an expected ExtractorError, meaning the site data simply does not contain the requested episode/upload. The for/else construct only raises when item_id was non-None and the loop completed without a break.","triggerScenarios":"Calling an ORF Radiothek URL with an explicit item id (e.g. the 'item' query segment of a collection URL) where the API response's items array contains no entry whose target params include that id under any of self._ID_NAMES. Happens when the episode was removed from the collection or the URL's item id is stale/typo'd.","commonSituations":"Linking to a specific episode inside an ORF radiothek collection after the episode was unpublished; using archived URLs from playlists; site reorganized its audiothek API so ids no longer match.","solutions":["Retry with the plain collection URL (no item id) so the extractor yields every item instead of hunting one id","Verify the item id in the URL against the current ORF Audiothek website listing","If the episode was removed upstream, accept it is gone and source audio elsewhere"],"exampleFix":"# before\nyoutube_dl 'https://audioapi.orf.at/radiothek/w/1234567?item=7654321'\n# after\nyoutube_dl 'https://audioapi.orf.at/radiothek/w/1234567'  # whole collection, then filter locally","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 'Item not found in collection' in str(e):\n        info = ydl.extract_info(collection_url_without_item, download=False)\n    else:\n        raise","preventionTips":["Prefer bare ORF collection URLs over item-pinned URLs","Snapshot collection contents (extract_info with process=False) shortly after broadcast","Treat expected ExtractorErrors as data-expiry signals, not bugs"],"tags":["orf","radiothek","content-gone","extractor-error","expected"],"backgroundTag":null,"analyzedSha":"956b8c585591b401a543e409accb163eeaaa1193","analyzedAt":"2026-08-14T18:59:47.863Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}