Explorar o código

[zingmp3] Add fatal flag

Sergey M․ %!s(int64=10) %!d(string=hai) anos
pai
achega
8119597d6f
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      youtube_dl/extractor/zingmp3.py

+ 3 - 1
youtube_dl/extractor/zingmp3.py

@@ -9,9 +9,11 @@ from ..utils import ExtractorError
 
 class ZingMp3BaseInfoExtractor(InfoExtractor):
 
-    def _extract_item(self, item):
+    def _extract_item(self, item, fatal=True):
         error_message = item.find('./errormessage').text
         if error_message:
+            if not fatal:
+                return
             raise ExtractorError(
                 '%s returned error: %s' % (self.IE_NAME, error_message),
                 expected=True)