X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2Fextractor%2Fshahid.py;h=1178b7a2781eb8809b99c78cce9fe80a33cafdd6;hb=0ae937a798c2c9a2eae4c6dbadc68a1a4c5e101c;hp=6e9903d5edea3d377aad5554630dbaa1f52d2c6c;hpb=06c085ab6e87b46630d291b3f1e991760e0cdc32;p=youtube-dl diff --git a/youtube_dl/extractor/shahid.py b/youtube_dl/extractor/shahid.py index 6e9903d5e..1178b7a27 100644 --- a/youtube_dl/extractor/shahid.py +++ b/youtube_dl/extractor/shahid.py @@ -16,7 +16,7 @@ class ShahidIE(InfoExtractor): 'url': 'https://shahid.mbc.net/ar/episode/90574/%D8%A7%D9%84%D9%85%D9%84%D9%83-%D8%B9%D8%A8%D8%AF%D8%A7%D9%84%D9%84%D9%87-%D8%A7%D9%84%D8%A5%D9%86%D8%B3%D8%A7%D9%86-%D8%A7%D9%84%D9%85%D9%88%D8%B3%D9%85-1-%D9%83%D9%84%D9%8A%D8%A8-3.html', 'info_dict': { 'id': '90574', - 'ext': 'm3u8', + 'ext': 'mp4', 'title': 'الملك عبدالله الإنسان الموسم 1 كليب 3', 'description': 'الفيلم الوثائقي - الملك عبد الله الإنسان', 'duration': 2972, @@ -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( @@ -81,7 +84,7 @@ class ShahidIE(InfoExtractor): compat_urllib_parse.urlencode({ 'apiKey': 'sh@hid0nlin3', 'hash': 'b2wMCTHpSmyxGqQjJFOycRmLSex+BpTK/ooxy6vHaqs=', - }).encode('utf-8')), + })), video_id, 'Downloading video JSON') video = video[api_vars['playerType']]