[zingmp3] Add fatal flag

This commit is contained in:
Sergey M․ 2015-10-10 22:08:38 +06:00
parent 43abd79950
commit 8119597d6f

View file

@ -9,9 +9,11 @@
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)