{"record":{"id":"23a7390c4aae34bf","repo":"ytdl-org/youtube-dl","slug":"this-video-is-drm-protected-23a739","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/toggle.py","lineNumber":158,"sourceCode":"                    note='Downloading %s MPD manifest' % vid_format,\n                    errnote='Failed to download %s MPD manifest' % vid_format,\n                    fatal=False))\n            elif ext == 'ism':\n                formats.extend(self._extract_ism_formats(\n                    video_url, video_id, ism_id=vid_format,\n                    note='Downloading %s ISM manifest' % vid_format,\n                    errnote='Failed to download %s ISM manifest' % vid_format,\n                    fatal=False))\n            elif ext == 'mp4':\n                formats.append({\n                    'ext': ext,\n                    'url': video_url,\n                    'format_id': vid_format,\n                })\n        if not formats:\n            for meta in (info.get('Metas') or []):\n                if meta.get('Key') == 'Encryption' and meta.get('Value') == '1':\n                    raise ExtractorError(\n                        'This video is DRM protected.', expected=True)\n            # Most likely because geo-blocked\n            raise ExtractorError('No downloadable videos found', expected=True)\n        self._sort_formats(formats)\n\n        thumbnails = []\n        for picture in info.get('Pictures', []):\n            if not isinstance(picture, dict):\n                continue\n            pic_url = picture.get('URL')\n            if not pic_url:\n                continue\n            thumbnail = {\n                'url': pic_url,\n            }\n            pic_size = picture.get('PicSize', '')\n            m = re.search(r'(?P<width>\\d+)[xX](?P<height>\\d+)', pic_size)\n            if m:","sourceCodeStart":140,"sourceCodeEnd":176,"githubUrl":"https://github.com/ytdl-org/youtube-dl/blob/956b8c585591b401a543e409accb163eeaaa1193/youtube_dl/extractor/toggle.py#L140-L176","documentation":"Raised by ToggleIE (Singapore mee siguang/toggle.sg) when no downloadable formats were produced and the media metadata Metas list contains Key 'Encryption' with Value '1', which Toggle uses to flag DRM. Marked expected=True: the video exists but cannot be downloaded because it is DRM protected.","triggerScenarios":"Extracting a toggle.sg video whose only renditions are PlayReady/Widevine protected (the ISM manifests fail or are skipped, mp4 entries absent), leaving 'formats' empty and the Encryption meta flag set.","commonSituations":"Premium/licensed Toggle content requiring a subscription; set-top-box exclusive streams; free clips usually serve plain mp4 and never hit this branch.","solutions":["Verify the same video plays for free on toggle.sg in a browser without a subscription; if it requires login, pass cookies with credentials (yt-dlp --cookies-from-browser / --username)","If it is genuinely DRM protected, no open-source downloader can decrypt it — use the platform's offline feature","Update to yt-dlp for current Toggle/mewatch extraction (site rebranded to mewatch.sg)","In scripts, detect this expected error and mark the item as DRM instead of retrying"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    ydl.extract_info(toggle_url)\nexcept ExtractorError as e:\n    if e.expected and 'DRM' in str(e):\n        mark_drm(url)  # undecryptable; do not retry","preventionTips":["Check whether the content needs a Toggle/mewatch subscription before queueing","Pass authenticated cookies for premium content","Treat DRM errors as terminal in job runners"],"tags":["extractor","drm","expected","subscription"],"backgroundTag":null,"analyzedSha":"956b8c585591b401a543e409accb163eeaaa1193","analyzedAt":"2026-08-14T18:59:47.863Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}