{"record":{"id":"80777d57915794c3","repo":"ytdl-org/youtube-dl","slug":"failed-to-find-idec-id","errorCode":null,"errorMessage":"Failed to find IDEC id","messagePattern":"Failed to find IDEC id","errorType":"exception","errorClass":"ExtractorError","httpStatus":null,"severity":"error","filePath":"youtube_dl/extractor/ceskatelevize.py","lineNumber":131,"sourceCode":"        if site_name and playlist_title:\n            playlist_title = re.split(r'\\s*[—|]\\s*%s' % (site_name, ), playlist_title, 1)[0]\n        playlist_description = self._og_search_description(webpage, default=None)\n        if playlist_description:\n            playlist_description = playlist_description.replace('\\xa0', ' ')\n\n        type_ = 'IDEC'\n        if re.search(r'(^/porady|/zive)/', parsed_url.path):\n            next_data = self._search_nextjs_data(webpage, playlist_id)\n            if '/zive/' in parsed_url.path:\n                idec = traverse_obj(next_data, ('props', 'pageProps', 'data', 'liveBroadcast', 'current', 'idec'), get_all=False)\n            else:\n                idec = traverse_obj(next_data, ('props', 'pageProps', 'data', ('show', 'mediaMeta'), 'idec'), get_all=False)\n                if not idec:\n                    idec = traverse_obj(next_data, ('props', 'pageProps', 'data', 'videobonusDetail', 'bonusId'), get_all=False)\n                    if idec:\n                        type_ = 'bonus'\n            if not idec:\n                raise ExtractorError('Failed to find IDEC id')\n            iframe_hash = self._download_webpage(\n                'https://www.ceskatelevize.cz/v-api/iframe-hash/',\n                playlist_id, note='Getting IFRAME hash')\n            query = {'hash': iframe_hash, 'origin': 'iVysilani', 'autoStart': 'true', type_: idec, }\n            webpage = self._download_webpage(\n                'https://www.ceskatelevize.cz/ivysilani/embed/iFramePlayer.php',\n                playlist_id, note='Downloading player', query=query)\n\n        NOT_AVAILABLE_STRING = 'This content is not available at your territory due to limited copyright.'\n        if '%s</p>' % NOT_AVAILABLE_STRING in webpage:\n            self.raise_geo_restricted(NOT_AVAILABLE_STRING)\n        if any(not_found in webpage for not_found in ('Neplatný parametr pro videopřehrávač', 'IDEC nebyl nalezen', )):\n            raise ExtractorError('no video with IDEC available', video_id=idec, expected=True)\n\n        type_ = None\n        episode_id = None\n\n        playlist = self._parse_json(","sourceCodeStart":113,"sourceCodeEnd":149,"githubUrl":"https://github.com/ytdl-org/youtube-dl/blob/956b8c585591b401a543e409accb163eeaaa1193/youtube_dl/extractor/ceskatelevize.py#L113-L149","documentation":"Raised by CeskaTelevizeIE when, for a /porady/ or /zive/ URL, the Next.js page data contains no 'idec' id in any of the traversed locations (liveBroadcast.current.idec, show/mediaMeta .idec, videobonusDetail.bonusId). The IDEC is the identifier needed to query the iVysilani embed player, so without it extraction stops.","triggerScenarios":"A URL matching the /porady/ or /zive/ path patterns whose __NEXT_DATA__ lacks the expected keys — e.g. a show hub page with no current episode, a redesigned page, a geo/blocked variant served to your region, or a live stream that is off-air.","commonSituations":"Ceska televize site redesigns moving the payload; trying to download a series landing page rather than a concrete episode; live URL used when nothing is broadcasting.","solutions":["Use the URL of a concrete episode page (playable in a browser), not the show/series landing page.","For /zive/ URLs, retry when a stream is actually live.","If the page plays fine in a browser, the data layout changed — update to yt-dlp or patch the traverse paths to the new locations.","Check whether you are being served a different regional variant of the page."],"exampleFix":"# before\nydl.extract('https://www.ceskatelevize.cz/porady/muj-porad/')  # hub page -> no IDEC\n\n# after: link to the concrete episode (has IDEC in page data)\nydl.extract('https://www.ceskatelevize.cz/porady/muj-porad/10123456789-dil-1')","handlingStrategy":"validation","validationCode":"import json, re\ndef page_has_idec(html):\n    m = re.search(r'<script[^>]+id=\"__NEXT_DATA__\"[^>]*>([^<]+)</script>', html)\n    if not m:\n        return False\n    d = json.loads(m.group(1))['props']['pageProps']['data']\n    return bool(d.get('liveBroadcast', {}).get('current', {}).get('idec')\n                or d.get('show', {}).get('idec') or d.get('mediaMeta', {}).get('idec')\n                or d.get('videobonusDetail', {}).get('bonusId'))","typeGuard":null,"tryCatchPattern":"from youtube_dl.utils import ExtractorError\ntry:\n    ydl.extract_info(url)\nexcept ExtractorError as e:\n    if 'Failed to find IDEC id' in str(e):\n        log('not an episode/live page: %s', url)  # permanent, don't retry\n    else:\n        raise","preventionTips":["Queue concrete episode URLs, not show hubs.","For live URLs, schedule extraction during broadcast windows.","Re-validate the __NEXT_DATA__ paths after Ceska televize redesigns."],"tags":["ceskatelevize","nextjs","idec","extractor"],"backgroundTag":null,"analyzedSha":"956b8c585591b401a543e409accb163eeaaa1193","analyzedAt":"2026-08-14T18:59:47.863Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}