youtube-dl: Fix returning the best format

This commit is contained in:
Laurent Bachelier 2014-03-08 20:20:07 +01:00
commit 10be4fb695

View file

@ -935,7 +935,8 @@ class VideoPage(BaseYoutubePage):
self._sort_formats(formats)
return formats[0]['url'], formats[0]['ext']
best = formats[-1]
return best['url'], best['ext']
def _sort_formats(self, formats):
if not formats: