{"record":{"id":"e91cc231d95c24fa","repo":"ytdl-org/youtube-dl","slug":"this-video-is-drm-protected-e91cc2","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/hotstar.py","lineNumber":132,"sourceCode":"        webpage = self._download_webpage(url, video_id)\n        app_state = self._parse_json(self._search_regex(\n            r'<script>window\\.APP_STATE\\s*=\\s*({.+?})</script>',\n            webpage, 'app state'), video_id)\n        video_data = {}\n        getters = list(\n            lambda x, k=k: x['initialState']['content%s' % k]['content']\n            for k in ('Data', 'Detail')\n        )\n        for v in app_state.values():\n            content = try_get(v, getters, dict)\n            if content and content.get('contentId') == video_id:\n                video_data = content\n                break\n\n        title = video_data['title']\n\n        if video_data.get('drmProtected'):\n            raise ExtractorError('This video is DRM protected.', expected=True)\n\n        headers = {'Referer': url}\n        formats = []\n        geo_restricted = False\n\n        if not self._USER_TOKEN:\n            self._DEVICE_ID = compat_str(uuid.uuid4())\n            self._USER_TOKEN = self._call_api_v2('um/v3/users', video_id, {\n                'X-HS-Platform': 'PCTV',\n                'Content-Type': 'application/json',\n            }, data=json.dumps({\n                'device_ids': [{\n                    'id': self._DEVICE_ID,\n                    'type': 'device_id',\n                }],\n            }).encode())['user_identity']\n\n        playback_sets = self._call_api_v2(","sourceCodeStart":114,"sourceCodeEnd":150,"githubUrl":"https://github.com/ytdl-org/youtube-dl/blob/956b8c585591b401a543e409accb163eeaaa1193/youtube_dl/extractor/hotstar.py#L114-L150","documentation":"The Hotstar extractor raises this expected ExtractorError when the fetched video metadata has drmProtected: true. DRM-protected streams (Widevine/FairPlay) cannot be downloaded by youtube-dl because the media is encrypted and the keys are only available to licensed DRM clients.","triggerScenarios":"Extracting any Hotstar URL whose contentData/contentDetail JSON contains 'drmProtected': true - typical for premium movies, live sports, and Hotstar Specials.","commonSituations":"Users attempt to download Hotstar originals or live cricket feeds which are always DRM protected; the extractor detects the flag before attempting format extraction.","solutions":["Accept that the content cannot be downloaded with youtube-dl/yt-dlp; no flag bypasses DRM.","Choose non-DRM content on Hotstar (most free/clips content is not protected).","Verify with a newer youtube-dl/yt-dlp build in case the site stopped marking the item as DRM protected."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"info = ydl.extract_info(url, download=False) if not is_drm else skip  # not exposed; instead check page in browser for DRM badge before queueing","typeGuard":null,"tryCatchPattern":"try:\n    ydl.download([url])\nexcept ExtractorError as e:\n    if 'DRM protected' in str(e):\n        mark_as_unsupported(url)  # permanent, do not retry","preventionTips":["Pre-filter known DRM catalogs (Hotstar originals, live sports) from download queues.","Treat this error as permanent - never retry the same URL.","Surface a clear message to end users that DRM content is unsupported by design."],"tags":["drm","extractor","licensing","hotstar","streaming"],"backgroundTag":null,"analyzedSha":"956b8c585591b401a543e409accb163eeaaa1193","analyzedAt":"2026-08-14T18:59:47.863Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}