From: Philipp Hagemeister Date: Mon, 27 Jan 2014 06:31:54 +0000 (+0100) Subject: Throw an error if no video formats are found X-Git-Url: http://git.oshgnacknak.de/?a=commitdiff_plain;h=7e8caf30c0552c64cd38eb3471cd6d49e5c1b20e;p=youtube-dl Throw an error if no video formats are found --- diff --git a/youtube_dl/extractor/common.py b/youtube_dl/extractor/common.py index db1ca9edb..f7478d459 100644 --- a/youtube_dl/extractor/common.py +++ b/youtube_dl/extractor/common.py @@ -466,6 +466,9 @@ class InfoExtractor(object): return RATING_TABLE.get(rating.lower(), None) def _sort_formats(self, formats): + if not formats: + raise ExtractorError(u'No video formats found') + def _formats_key(f): # TODO remove the following workaround from ..utils import determine_ext