From: Philipp Hagemeister Date: Mon, 13 May 2013 17:54:07 +0000 (+0200) Subject: Throw a better error if the protocol is invalid X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=419c64b107896628a159f558abdb298117249b9a;p=youtube-dl Throw a better error if the protocol is invalid --- 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: