{"record":{"id":"03ffc103bc81cee3","repo":"ytdl-org/youtube-dl","slug":"could-not-extract-channel-id","errorCode":null,"errorMessage":"Could not extract channel id","messagePattern":"Could not extract channel id","errorType":"exception","errorClass":"ExtractorError","httpStatus":null,"severity":"error","filePath":"youtube_dl/extractor/zattoo.py","lineNumber":92,"sourceCode":"        self._login()\n\n    def _extract_cid(self, video_id, channel_name):\n        channel_groups = self._download_json(\n            '%s/zapi/v2/cached/channels/%s' % (self._host_url(),\n                                               self._power_guide_hash),\n            video_id, 'Downloading channel list',\n            query={'details': False})['channel_groups']\n        channel_list = []\n        for chgrp in channel_groups:\n            channel_list.extend(chgrp['channels'])\n        try:\n            return next(\n                chan['cid'] for chan in channel_list\n                if chan.get('cid') and (\n                    chan.get('display_alias') == channel_name\n                    or chan.get('cid') == channel_name))\n        except StopIteration:\n            raise ExtractorError('Could not extract channel id')\n\n    def _extract_cid_and_video_info(self, video_id):\n        data = self._download_json(\n            '%s/zapi/v2/cached/program/power_details/%s' % (\n                self._host_url(), self._power_guide_hash),\n            video_id,\n            'Downloading video information',\n            query={\n                'program_ids': video_id,\n                'complete': True,\n            })\n\n        p = data['programs'][0]\n        cid = p['cid']\n\n        info_dict = {\n            'id': video_id,\n            'title': p.get('t') or p['et'],","sourceCodeStart":74,"sourceCodeEnd":110,"githubUrl":"https://github.com/ytdl-org/youtube-dl/blob/956b8c585591b401a543e409accb163eeaaa1193/youtube_dl/extractor/zattoo.py#L74-L110","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Open the channel page in a browser while logged in with the same account to confirm the channel is available to you","Use the exact channel slug from the current Zattoo URL (copy it fresh from the site)","Upgrade/verify the subscription package that includes the channel","Update youtube-dl in case the Zattoo API channel-list format changed"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    ydl.download([url])\nexcept ExtractorError as e:\n    if 'Could not extract channel id' in str(e):\n        log.warning('Channel %s not in account channel list; verify subscription/region', url)","preventionTips":["Use channel slugs copied fresh from the Zattoo web UI","Periodically refresh hardcoded channel URLs — providers rename channels","Check entitlements (subscription package, country) before automating channel downloads"],"tags":["zattoo","channel-list","lookup-failed","extractor"],"backgroundTag":null,"analyzedSha":"956b8c585591b401a543e409accb163eeaaa1193","analyzedAt":"2026-08-14T18:59:47.863Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}