aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorremitamine <remitamine@gmail.com>2016-01-10 07:55:58 +0100
committerremitamine <remitamine@gmail.com>2016-01-10 07:55:58 +0100
commit2334762b03dec5da4d6788539e3e11192eb97010 (patch)
tree421ae9a28c7ff44202510034dfe4150646fef2be
parent3fc088f8c7f61026943a62fc28e051a7d3a6bdd5 (diff)
downloadyoutube-dl-2334762b03dec5da4d6788539e3e11192eb97010.tar.xz
[shahid] raise ExtractorError if the video is DRM protected
-rw-r--r--youtube_dl/extractor/shahid.py3
1 files changed, 3 insertions, 0 deletions
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 @@ class ShahidIE(InfoExtractor):
'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(