ytdl-org/youtube-dl · error · ExtractorError

Failed to find IDEC id

Error message

Failed to find IDEC id

What it means

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.

Source

Thrown at youtube_dl/extractor/ceskatelevize.py:131

        if site_name and playlist_title:
            playlist_title = re.split(r'\s*[—|]\s*%s' % (site_name, ), playlist_title, 1)[0]
        playlist_description = self._og_search_description(webpage, default=None)
        if playlist_description:
            playlist_description = playlist_description.replace('\xa0', ' ')

        type_ = 'IDEC'
        if re.search(r'(^/porady|/zive)/', parsed_url.path):
            next_data = self._search_nextjs_data(webpage, playlist_id)
            if '/zive/' in parsed_url.path:
                idec = traverse_obj(next_data, ('props', 'pageProps', 'data', 'liveBroadcast', 'current', 'idec'), get_all=False)
            else:
                idec = traverse_obj(next_data, ('props', 'pageProps', 'data', ('show', 'mediaMeta'), 'idec'), get_all=False)
                if not idec:
                    idec = traverse_obj(next_data, ('props', 'pageProps', 'data', 'videobonusDetail', 'bonusId'), get_all=False)
                    if idec:
                        type_ = 'bonus'
            if not idec:
                raise ExtractorError('Failed to find IDEC id')
            iframe_hash = self._download_webpage(
                'https://www.ceskatelevize.cz/v-api/iframe-hash/',
                playlist_id, note='Getting IFRAME hash')
            query = {'hash': iframe_hash, 'origin': 'iVysilani', 'autoStart': 'true', type_: idec, }
            webpage = self._download_webpage(
                'https://www.ceskatelevize.cz/ivysilani/embed/iFramePlayer.php',
                playlist_id, note='Downloading player', query=query)

        NOT_AVAILABLE_STRING = 'This content is not available at your territory due to limited copyright.'
        if '%s</p>' % NOT_AVAILABLE_STRING in webpage:
            self.raise_geo_restricted(NOT_AVAILABLE_STRING)
        if any(not_found in webpage for not_found in ('Neplatný parametr pro videopřehrávač', 'IDEC nebyl nalezen', )):
            raise ExtractorError('no video with IDEC available', video_id=idec, expected=True)

        type_ = None
        episode_id = None

        playlist = self._parse_json(

View on GitHub (pinned to 956b8c5855)

Solutions

  1. Use the URL of a concrete episode page (playable in a browser), not the show/series landing page.
  2. For /zive/ URLs, retry when a stream is actually live.
  3. 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.
  4. Check whether you are being served a different regional variant of the page.

Example fix

# before
ydl.extract('https://www.ceskatelevize.cz/porady/muj-porad/')  # hub page -> no IDEC

# after: link to the concrete episode (has IDEC in page data)
ydl.extract('https://www.ceskatelevize.cz/porady/muj-porad/10123456789-dil-1')
Defensive patterns

Strategy: validation

Validate before calling

import json, re
def page_has_idec(html):
    m = re.search(r'<script[^>]+id="__NEXT_DATA__"[^>]*>([^<]+)</script>', html)
    if not m:
        return False
    d = json.loads(m.group(1))['props']['pageProps']['data']
    return bool(d.get('liveBroadcast', {}).get('current', {}).get('idec')
                or d.get('show', {}).get('idec') or d.get('mediaMeta', {}).get('idec')
                or d.get('videobonusDetail', {}).get('bonusId'))

Try / catch

from youtube_dl.utils import ExtractorError
try:
    ydl.extract_info(url)
except ExtractorError as e:
    if 'Failed to find IDEC id' in str(e):
        log('not an episode/live page: %s', url)  # permanent, don't retry
    else:
        raise

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of ytdl-org/youtube-dl@956b8c5855 (2026-08-14). Data as JSON: /api/errors/80777d57915794c3. Report an issue: GitHub.