aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2013-05-13 19:54:07 +0200
committerPhilipp Hagemeister <phihag@phihag.de>2013-05-13 19:54:07 +0200
commit419c64b107896628a159f558abdb298117249b9a (patch)
treec55ab997b7e49ef7e49152ae98b0c1db4e03392f
parent99a5ae3f8ed30ee7b6fb723232895d7836afbc2d (diff)
Throw a better error if the protocol is invalid
-rwxr-xr-xyoutube_dl/InfoExtractors.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/youtube_dl/InfoExtractors.py b/youtube_dl/InfoExtractors.py
index ce959a6df..6d6203a1c 100755
--- a/youtube_dl/InfoExtractors.py
+++ b/youtube_dl/InfoExtractors.py
@@ -1304,6 +1304,8 @@ class GenericIE(InfoExtractor):
opener.add_handler(handler())
response = opener.open(HeadRequest(url))
+ if response is None:
+ raise ExtractorError(u'Invalid URL protocol')
new_url = response.geturl()
if url == new_url: