{"record":{"id":"6e1218f71ddfd010","repo":"ytdl-org/youtube-dl","slug":"this-video-is-drm-protected-6e1218","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/youtube.py","lineNumber":2783,"sourceCode":"                for f in self._extract_mpd_formats(\n                        dash_manifest_url, video_id, fatal=False):\n                    if process_manifest_format(\n                            f, 'dash', None, f['format_id']):\n                        f['filesize'] = traverse_obj(f, (\n                            ('fragment_base_url', 'url'), T(lambda u: self._search_regex(\n                                r'/clen/(\\d+)', u, 'file size', default=None)),\n                            T(int_or_none)), get_all=False)\n                        formats.append(f)\n\n        playable_formats = [f for f in formats if not f.get('has_drm')]\n        if formats:\n            if not playable_formats:\n                # If there are no formats that definitely don't have DRM, all have DRM\n                self.report_drm(video_id)\n            formats[:] = playable_formats\n        else:\n            if streaming_data.get('licenseInfos'):\n                raise ExtractorError(\n                    'This video is DRM protected.', expected=True)\n            pemr = try_get(\n                playability_status,\n                lambda x: x['errorScreen']['playerErrorMessageRenderer'],\n                dict) or {}\n            reason = get_text(pemr.get('reason')) or playability_status.get('reason') or ''\n            subreason = pemr.get('subreason')\n            if subreason:\n                subreason = clean_html(get_text(subreason))\n                if subreason.startswith('The uploader has not made this video available in your country'):\n                    countries = microformat.get('availableCountries')\n                    if not countries:\n                        regions_allowed = search_meta('regionsAllowed')\n                        countries = regions_allowed.split(',') if regions_allowed else None\n                    self.raise_geo_restricted(\n                        subreason, countries)\n                reason += '\\n' + subreason\n","sourceCodeStart":2765,"sourceCodeEnd":2801,"githubUrl":"https://github.com/ytdl-org/youtube-dl/blob/956b8c585591b401a543e409accb163eeaaa1193/youtube_dl/extractor/youtube.py#L2765-L2801","documentation":"Raised by YoutubeIE._real_extract when the streaming_data contains no usable formats and includes 'licenseInfos', meaning YouTube served DRM-licensed streams only. Expected=True: the video is published with DRM protection that youtube-dl cannot and will not circumvent. It is distinct from report_drm, which fires when formats exist but all carry has_drm.","triggerScenarios":"Extracting a video whose player response has empty/no streaming formats but streaming_data['licenseInfos'] is non-empty — e.g. movies/TV purchases, DRM-protected channel content (often also requiring purchase).","commonSituations":"Paid rentals/purchases on YouTube Movies; labels/publishers delivering DRM-protected streams; users expecting youtube-dl to bypass DRM (it does not).","solutions":["Accept that DRM content is out of scope — no youtube-dl option will decrypt it.","If you believe the video should be DRM-free, verify in a browser and check whether a non-DRM format appears when authenticated; otherwise use another source.","For batch jobs, catch this expected error and skip such entries.","Ensure you are not hitting this due to a partial player response (try with cookies); a normal video with licenseInfos absent would instead surface a playability reason."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"def is_drm_response(player_response: dict) -> bool:\n    streaming_data = player_response.get('streamingData') or {}\n    return bool(streaming_data.get('licenseInfos'))","typeGuard":null,"tryCatchPattern":"try:\n    info = ydl.extract_info(url)\nexcept ExtractorError as e:\n    if 'DRM protected' in str(e):\n        skip_permanently(url)  # not retryable; no workaround exists\n    raise","preventionTips":["Exclude paid movies/TV and DRM-flagged content from download queues at source.","Do not retry — DRM availability will not change without a license youtube-dl will never use."],"tags":["youtube","drm","expected-error","licensing"],"backgroundTag":null,"analyzedSha":"956b8c585591b401a543e409accb163eeaaa1193","analyzedAt":"2026-08-14T18:59:47.863Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}