ytdl-org/youtube-dl · error · ExtractorError

Could not extract channel id

Error message

Could not extract channel id

What it means

Raised by ZattooIE._extract_cid when the downloaded channel list (aggregated from all channel_groups) contains no entry whose 'display_alias' or 'cid' equals the channel name parsed from the URL. It means the human-readable channel in the URL could not be mapped to an internal Zattoo channel id.

Source

Thrown at youtube_dl/extractor/zattoo.py:92

        self._login()

    def _extract_cid(self, video_id, channel_name):
        channel_groups = self._download_json(
            '%s/zapi/v2/cached/channels/%s' % (self._host_url(),
                                               self._power_guide_hash),
            video_id, 'Downloading channel list',
            query={'details': False})['channel_groups']
        channel_list = []
        for chgrp in channel_groups:
            channel_list.extend(chgrp['channels'])
        try:
            return next(
                chan['cid'] for chan in channel_list
                if chan.get('cid') and (
                    chan.get('display_alias') == channel_name
                    or chan.get('cid') == channel_name))
        except StopIteration:
            raise ExtractorError('Could not extract channel id')

    def _extract_cid_and_video_info(self, video_id):
        data = self._download_json(
            '%s/zapi/v2/cached/program/power_details/%s' % (
                self._host_url(), self._power_guide_hash),
            video_id,
            'Downloading video information',
            query={
                'program_ids': video_id,
                'complete': True,
            })

        p = data['programs'][0]
        cid = p['cid']

        info_dict = {
            'id': video_id,
            'title': p.get('t') or p['et'],

View on GitHub (pinned to 956b8c5855)

Solutions

  1. Open the channel page in a browser while logged in with the same account to confirm the channel is available to you
  2. Use the exact channel slug from the current Zattoo URL (copy it fresh from the site)
  3. Upgrade/verify the subscription package that includes the channel
  4. Update youtube-dl in case the Zattoo API channel-list format changed
Defensive patterns

Strategy: try-catch

Try / catch

try:
    ydl.download([url])
except ExtractorError as e:
    if 'Could not extract channel id' in str(e):
        log.warning('Channel %s not in account channel list; verify subscription/region', url)

Prevention

When it happens

Trigger: Requesting a Zattoo live channel URL whose name does not exist in the account's channel list: renamed channels, channels not in the subscription package, region-restricted channels, or a typo in the channel slug.

Common situations: Channel was renamed or removed by the provider; free account trying to reach a premium channel; using an old recorded URL after a package change; country-specific channel sets when travelling or via VPN.

Related errors


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