From 419c64b107896628a159f558abdb298117249b9a Mon Sep 17 00:00:00 2001 From: Philipp Hagemeister Date: Mon, 13 May 2013 19:54:07 +0200 Subject: [PATCH] Throw a better error if the protocol is invalid --- youtube_dl/InfoExtractors.py | 2 ++ 1 file changed, 2 insertions(+) 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: