[shahid] raise ExtractorError instead of warning
authorremitamine <remitamine@gmail.com>
Sat, 18 Jul 2015 21:55:40 +0000 (22:55 +0100)
committerremitamine <remitamine@gmail.com>
Sat, 18 Jul 2015 21:55:40 +0000 (22:55 +0100)
youtube_dl/extractor/shahid.py

index d492070da43bbe8f39df2d56dbf527c73aa65915..6d76ef590cf1488c7c3e7e57d92f6b70b3de4e9a 100644 (file)
@@ -1,5 +1,8 @@
 from .common import InfoExtractor
-from ..utils import get_element_by_id
+from ..utils import (
+    get_element_by_id,
+    ExtractorError,
+}
 
 class ShahidIE(InfoExtractor):
     _VALID_URL = r'https?://shahid\.mbc\.net/ar/episode/(?P<id>\d+)/?'
@@ -43,7 +46,7 @@ class ShahidIE(InfoExtractor):
             m3u8_url = player_json_data['url']
         else:
             for error in json_data['error'].values():
-                self.report_warning(error)
+                raise ExtractorError(error)
             return
         formats = self._extract_m3u8_formats(m3u8_url, video_id)
         return {