]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[googledrive] raise ExtractorError instead of warning
authorremitamine <remitamine@gmail.com>
Sat, 18 Jul 2015 22:31:14 +0000 (23:31 +0100)
committerremitamine <remitamine@gmail.com>
Thu, 23 Jul 2015 10:59:13 +0000 (11:59 +0100)
youtube_dl/extractor/googledrive.py

index a3d9b44506015002c3dad145b614f763995cac86..7bc7b7a0df6058f12642fac7bf07b3da1aa07c1a 100644 (file)
@@ -1,7 +1,10 @@
 import re
 
 from .common import InfoExtractor
-from ..utils import RegexNotFoundError
+from ..utils import (
+    RegexNotFoundError,
+    ExtractorError,
+)
 
 class GoogleDriveEmbedIE(InfoExtractor):
     _VALID_URL = r'https?://(?:video\.google\.com/get_player\?.*?docid=|(?:docs|drive)\.google\.com/file/d/)(?P<id>[a-zA-Z0-9_-]{28})'
@@ -97,10 +100,10 @@ class GoogleDriveIE(InfoExtractor):
                     webpage,
                     'reason'
                 )
-                self.report_warning(reason)
+                raise ExtractorError(reason)
                 return
             except RegexNotFoundError:
-                self.report_warning('not a video')
+                raise ExtractorError('not a video')
                 return
 
         fmt_stream_map = fmt_stream_map.split(',')