ytdl-org/youtube-dl · error · ExtractorError
This video is DRM protected.
Error message
This video is DRM protected.
What it means
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.
Source
Thrown at youtube_dl/extractor/hotstar.py:132
webpage = self._download_webpage(url, video_id)
app_state = self._parse_json(self._search_regex(
r'<script>window\.APP_STATE\s*=\s*({.+?})</script>',
webpage, 'app state'), video_id)
video_data = {}
getters = list(
lambda x, k=k: x['initialState']['content%s' % k]['content']
for k in ('Data', 'Detail')
)
for v in app_state.values():
content = try_get(v, getters, dict)
if content and content.get('contentId') == video_id:
video_data = content
break
title = video_data['title']
if video_data.get('drmProtected'):
raise ExtractorError('This video is DRM protected.', expected=True)
headers = {'Referer': url}
formats = []
geo_restricted = False
if not self._USER_TOKEN:
self._DEVICE_ID = compat_str(uuid.uuid4())
self._USER_TOKEN = self._call_api_v2('um/v3/users', video_id, {
'X-HS-Platform': 'PCTV',
'Content-Type': 'application/json',
}, data=json.dumps({
'device_ids': [{
'id': self._DEVICE_ID,
'type': 'device_id',
}],
}).encode())['user_identity']
playback_sets = self._call_api_v2(View on GitHub (pinned to 956b8c5855)
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.
Defensive patterns
Strategy: validation
Validate before calling
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
Try / catch
try:
ydl.download([url])
except ExtractorError as e:
if 'DRM protected' in str(e):
mark_as_unsupported(url) # permanent, do not retry Prevention
- 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.
When it happens
Trigger: Extracting any Hotstar URL whose contentData/contentDetail JSON contains 'drmProtected': true - typical for premium movies, live sports, and Hotstar Specials.
Common situations: Users attempt to download Hotstar originals or live cricket feeds which are always DRM protected; the extractor detects the flag before attempting format extraction.
Related errors
- message
- This video is DRM protected.
- Video %s is DRM protected
- This video is DRM protected.
- This video is DRM protected.
AI-assisted analysis of ytdl-org/youtube-dl@956b8c5855 (2026-08-14).
Data as JSON: /api/errors/e91cc231d95c24fa.
Report an issue: GitHub.