{"record":{"id":"8f1881abfcf13a35","repo":"ytdl-org/youtube-dl","slug":"this-video-is-drm-protected-8f1881","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/globo.py","lineNumber":100,"sourceCode":"                }).encode(), headers={\n                    'Content-Type': 'application/json; charset=utf-8',\n                }) or {}).get('glbId')\n            if glb_id:\n                self._set_cookie('.globo.com', 'GLBID', glb_id)\n        except ExtractorError as e:\n            if isinstance(e.cause, compat_HTTPError) and e.cause.code == 401:\n                resp = self._parse_json(e.cause.read(), None)\n                raise ExtractorError(resp.get('userMessage') or resp['id'], expected=True)\n            raise\n\n    def _real_extract(self, url):\n        video_id = self._match_id(url)\n\n        video = self._download_json(\n            'http://api.globovideos.com/videos/%s/playlist' % video_id,\n            video_id)['videos'][0]\n        if video.get('encrypted') is True:\n            raise ExtractorError('This video is DRM protected.', expected=True)\n\n        title = video['title']\n\n        formats = []\n        subtitles = {}\n        for resource in video['resources']:\n            resource_id = resource.get('_id')\n            resource_url = resource.get('url')\n            resource_type = resource.get('type')\n            if not resource_url or (resource_type == 'media' and not resource_id) or resource_type not in ('subtitle', 'media'):\n                continue\n\n            if resource_type == 'subtitle':\n                subtitles.setdefault(resource.get('language') or 'por', []).append({\n                    'url': resource_url,\n                })\n                continue\n","sourceCodeStart":82,"sourceCodeEnd":118,"githubUrl":"https://github.com/ytdl-org/youtube-dl/blob/956b8c585591b401a543e409accb163eeaaa1193/youtube_dl/extractor/globo.py#L82-L118","documentation":"Raised by the Globo extractor when the playlist API marks the video with encrypted: true, meaning the stream is DRM protected and cannot be downloaded by youtube-dl. Marked expected=True so it prints cleanly instead of requesting a bug report.","triggerScenarios":"Extracting any Globoplay video whose api.globovideos.com playlist entry has {encrypted: true} — typically premium/live DRM-wrapped content (Widevine/PlayReady HLS).","commonSituations":"Premium Globoplay content, live channels, or repriced back-catalog moved behind DRM. Logging in does not help; the DRM flag is per-video, not per-account.","solutions":["No fix within youtube-dl — DRM streams are intentionally unsupported","Use the official Globoplay app/website for playback","Check whether a non-DRM (free/older) edition of the same video exists"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"import requests\nv = requests.get(f'http://api.globovideos.com/videos/{vid}/playlist').json()['videos'][0]\nif v.get('encrypted') is True:\n    print('DRM protected — not downloadable')","typeGuard":"def globo_playable(video):\n    return video.get('encrypted') is not True","tryCatchPattern":"try:\n    ydl.extract_info(url)\nexcept DownloadError as e:\n    if 'DRM protected' in str(e):\n        skip_permanently(url)  # never retriable\n    else:\n        raise","preventionTips":["Filter DRM-flagged items out of queues permanently — retries never help","Check the playlist JSON's 'encrypted' flag before handing URLs to workers"],"tags":["drm","globo","unsupported-content"],"backgroundTag":null,"analyzedSha":"956b8c585591b401a543e409accb163eeaaa1193","analyzedAt":"2026-08-14T18:59:47.863Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}