From 2334762b03dec5da4d6788539e3e11192eb97010 Mon Sep 17 00:00:00 2001 From: remitamine Date: Sun, 10 Jan 2016 07:55:58 +0100 Subject: [PATCH] [shahid] raise ExtractorError if the video is DRM protected --- youtube_dl/extractor/shahid.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/youtube_dl/extractor/shahid.py b/youtube_dl/extractor/shahid.py index f76fb12c0..1178b7a27 100644 --- a/youtube_dl/extractor/shahid.py +++ b/youtube_dl/extractor/shahid.py @@ -73,6 +73,9 @@ def _real_extract(self, url): 'https://shahid.mbc.net/arContent/getPlayerContent-param-.id-%s.type-%s.html' % (video_id, api_vars['type']), video_id, 'Downloading player JSON') + if player.get('drm'): + raise ExtractorError('This video is DRM protected.', expected=True) + formats = self._extract_m3u8_formats(player['url'], video_id, 'mp4') video = self._download_json(