{"record":{"id":"2bfba1181d8a20e5","repo":"ytdl-org/youtube-dl","slug":"this-video-is-drm-protected-2bfba1","errorCode":null,"errorMessage":"This video is DRM protected.","messagePattern":"This video is DRM protected\\.","errorType":"exception","errorClass":"ExtractorError","httpStatus":null,"severity":"error","filePath":"youtube_dl/extractor/wakanim.py","lineNumber":49,"sourceCode":"        # DRM Protected\n        'url': 'https://www.wakanim.tv/de/v2/catalogue/episode/7843/sword-art-online-alicization-omu-arc-2-folge-15-omu',\n        'only_matching': True,\n    }]\n\n    def _real_extract(self, url):\n        video_id = self._match_id(url)\n\n        webpage = self._download_webpage(url, video_id)\n\n        m3u8_url = urljoin(url, self._search_regex(\n            r'file\\s*:\\s*([\"\\'])(?P<url>(?:(?!\\1).)+)\\1', webpage, 'm3u8 url',\n            group='url'))\n        # https://docs.microsoft.com/en-us/azure/media-services/previous/media-services-content-protection-overview#streaming-urls\n        encryption = self._search_regex(\n            r'encryption%3D(c(?:enc|bc(?:s-aapl)?))',\n            m3u8_url, 'encryption', default=None)\n        if encryption and encryption in ('cenc', 'cbcs-aapl'):\n            raise ExtractorError('This video is DRM protected.', expected=True)\n\n        formats = self._extract_m3u8_formats(\n            m3u8_url, video_id, 'mp4', entry_protocol='m3u8_native',\n            m3u8_id='hls')\n\n        info = self._search_json_ld(webpage, video_id, default={})\n\n        title = self._search_regex(\n            (r'<h1[^>]+\\bclass=[\"\\']episode_h1[^>]+\\btitle=([\"\\'])(?P<title>(?:(?!\\1).)+)\\1',\n             r'<span[^>]+\\bclass=[\"\\']episode_title[\"\\'][^>]*>(?P<title>[^<]+)'),\n            webpage, 'title', default=None, group='title')\n\n        return merge_dicts(info, {\n            'id': video_id,\n            'title': title,\n            'formats': formats,\n        })\n","sourceCodeStart":31,"sourceCodeEnd":67,"githubUrl":"https://github.com/ytdl-org/youtube-dl/blob/956b8c585591b401a543e409accb163eeaaa1193/youtube_dl/extractor/wakanim.py#L31-L67","documentation":"Raised by the Wakanim extractor when the m3u8 URL embedded in the page contains an encryption parameter of cenc or cbcs-aapl. Per Azure Media Services streaming-URL conventions, those values indicate the stream is protected with DRM (e.g. PlayReady/Widevine/FairPlay), which youtube-dl cannot decrypt.","triggerScenarios":"Extracting a Wakanim video whose regex-matched m3u8 URL matches r'encryption%3D(c(?:enc|bc(?:s-aapl)?))' with a captured value of 'cenc' or 'cbcs-aapl'; the check runs before _extract_m3u8_formats.","commonSituations":"Attempting to download licensed anime or simulcast content on Wakanim (French/German licensed streaming); all premium Wakanim streams are DRM-protected, so this error is the expected outcome for subscribers too.","solutions":["Do not attempt to bypass DRM — use the official Wakanim apps/site for playback instead.","Confirm with a browser (network tab) that the manifest really is encrypted; if not, the URL regex captured a wrong URL and the extractor needs a fix.","No youtube-dl option can decrypt cenc/cbcs-aapl streams; there is no client workaround."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"m3u8_url = extract_m3u8_from_page(webpage)\nencryption = re.search(r'encryption%3D(c(?:enc|bc(?:s-aapl)?))', m3u8_url or '')\nis_drm = bool(encryption and encryption.group(1) in ('cenc', 'cbcs-aapl'))","typeGuard":"def is_drm_manifest(m3u8_url: str) -> bool:\n    m = re.search(r'encryption%3D(c(?:enc|bc(?:s-aapl)?))', m3u8_url)\n    return bool(m and m.group(1) in ('cenc', 'cbcs-aapl'))","tryCatchPattern":"try:\n    info = ydl.extract_info(url)\nexcept ExtractorError as e:\n    if 'DRM protected' in str(e):\n        skip_drm(url)\n    else:\n        raise","preventionTips":["Assume all Wakanim premium streams are DRM-protected and exclude them from download queues.","Check manifests for encryption=cenc/cbcs-aapl before invoking the extractor in custom tooling.","Never rely on workarounds claiming to strip DRM — use official playback apps."],"tags":["drm","streaming","encrypted","extractor","wakanim"],"backgroundTag":null,"analyzedSha":"956b8c585591b401a543e409accb163eeaaa1193","analyzedAt":"2026-08-14T18:59:47.863Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}