浏览代码

[generic] Clarify error messages

Philipp Hagemeister 12 年之前
父节点
当前提交
e484c81f0c
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      youtube_dl/extractor/generic.py

+ 3 - 3
youtube_dl/extractor/generic.py

@@ -117,7 +117,7 @@ class GenericIE(InfoExtractor):
         except ValueError:
         except ValueError:
             # since this is the last-resort InfoExtractor, if
             # since this is the last-resort InfoExtractor, if
             # this error is thrown, it'll be thrown here
             # this error is thrown, it'll be thrown here
-            raise ExtractorError(u'Invalid URL: %s' % url)
+            raise ExtractorError(u'Failed to download URL: %s' % url)
 
 
         self.report_extraction(video_id)
         self.report_extraction(video_id)
         # Look for BrightCove:
         # Look for BrightCove:
@@ -149,12 +149,12 @@ class GenericIE(InfoExtractor):
             # HTML5 video
             # HTML5 video
             mobj = re.search(r'<video[^<]*(?:>.*?<source.*?)? src="([^"]+)"', webpage, flags=re.DOTALL)
             mobj = re.search(r'<video[^<]*(?:>.*?<source.*?)? src="([^"]+)"', webpage, flags=re.DOTALL)
         if mobj is None:
         if mobj is None:
-            raise ExtractorError(u'Invalid URL: %s' % url)
+            raise ExtractorError(u'Unsupported URL: %s' % url)
 
 
         # It's possible that one of the regexes
         # It's possible that one of the regexes
         # matched, but returned an empty group:
         # matched, but returned an empty group:
         if mobj.group(1) is None:
         if mobj.group(1) is None:
-            raise ExtractorError(u'Invalid URL: %s' % url)
+            raise ExtractorError(u'Did not find a valid video URL at %s' % url)
 
 
         video_url = mobj.group(1)
         video_url = mobj.group(1)
         video_url = compat_urlparse.urljoin(url, video_url)
         video_url = compat_urlparse.urljoin(url, video_url)