projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[youku] compare bytes and str for compatible; use compat_urllib_parse for making...
[youtube-dl]
/
youtube_dl
/
extractor
/
zingmp3.py
diff --git
a/youtube_dl/extractor/zingmp3.py
b/youtube_dl/extractor/zingmp3.py
index 1afbe68ed68e084028cda0c0f9d7d80a385118fb..7dc1e2f2bd3f36e2b71e199fb5e5f6f2cc4e18e9 100644
(file)
--- a/
youtube_dl/extractor/zingmp3.py
+++ b/
youtube_dl/extractor/zingmp3.py
@@
-4,12
+4,18
@@
from __future__ import unicode_literals
import re
from .common import InfoExtractor
import re
from .common import InfoExtractor
+from ..utils import ExtractorError
class ZingMp3BaseInfoExtractor(InfoExtractor):
class ZingMp3BaseInfoExtractor(InfoExtractor):
- @staticmethod
- def _extract_item(item):
+ def _extract_item(self, item):
+ error_message = item.find('./errormessage').text
+ if error_message:
+ raise ExtractorError(
+ '%s returned error: %s' % (self.IE_NAME, error_message),
+ expected=True)
+
title = item.find('./title').text.strip()
source = item.find('./source').text
extension = item.attrib['type']
title = item.find('./title').text.strip()
source = item.find('./source').text
extension = item.attrib['type']