浏览代码

[shahid] raise ExtractorError if the video is DRM protected

remitamine 9 年之前
父节点
当前提交
2334762b03
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      youtube_dl/extractor/shahid.py

+ 3 - 0
youtube_dl/extractor/shahid.py

@@ -73,6 +73,9 @@ class ShahidIE(InfoExtractor):
             'https://shahid.mbc.net/arContent/getPlayerContent-param-.id-%s.type-%s.html'
             'https://shahid.mbc.net/arContent/getPlayerContent-param-.id-%s.type-%s.html'
             % (video_id, api_vars['type']), video_id, 'Downloading player JSON')
             % (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')
         formats = self._extract_m3u8_formats(player['url'], video_id, 'mp4')
 
 
         video = self._download_json(
         video = self._download_json(