mirror of
https://github.com/l1ving/youtube-dl
synced 2024-11-22 14:12:52 +08:00
raise ExtractorError instead of calling back
This commit is contained in:
parent
180e689f7e
commit
decd1d1737
@ -3322,8 +3322,7 @@ class JustinTVIE(InfoExtractor):
|
|||||||
response = json.loads(webpage)
|
response = json.loads(webpage)
|
||||||
if type(response) != list:
|
if type(response) != list:
|
||||||
error_text = response.get('error', 'unknown error')
|
error_text = response.get('error', 'unknown error')
|
||||||
self._downloader.report_error(u'Justin.tv API: %s' % error_text)
|
raise ExtractorError(u'Justin.tv API: %s' % error_text)
|
||||||
return
|
|
||||||
info = []
|
info = []
|
||||||
for clip in response:
|
for clip in response:
|
||||||
video_url = clip['video_file_url']
|
video_url = clip['video_file_url']
|
||||||
@ -3382,8 +3381,7 @@ class FunnyOrDieIE(InfoExtractor):
|
|||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
mobj = re.match(self._VALID_URL, url)
|
mobj = re.match(self._VALID_URL, url)
|
||||||
if mobj is None:
|
if mobj is None:
|
||||||
self._downloader.report_error(u'invalid URL: %s' % url)
|
raise ExtractorError(u'invalid URL: %s' % url)
|
||||||
return
|
|
||||||
|
|
||||||
video_id = mobj.group('id')
|
video_id = mobj.group('id')
|
||||||
webpage = self._download_webpage(url, video_id)
|
webpage = self._download_webpage(url, video_id)
|
||||||
|
Loading…
Reference in New Issue
Block a user