aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSergey M․ <[email protected]>2014-05-18 14:23:02 +0700
committerSergey M․ <[email protected]>2014-05-18 14:23:02 +0700
commit4ea5c7b70dd5cb26036cea815a9d9599aac0de36 (patch)
tree1b3538ea08ce6d51b4d3ab17fe6e5e08973c0b4f
parent8dfa187b8a54fbe9648975216e11ad8a34d09e60 (diff)
downloadyoutube-dl-4ea5c7b70dd5cb26036cea815a9d9599aac0de36.tar.gz
youtube-dl-4ea5c7b70dd5cb26036cea815a9d9599aac0de36.zip
[ndr] Improve thumbnail extraction
-rw-r--r--youtube_dl/extractor/ndr.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/youtube_dl/extractor/ndr.py b/youtube_dl/extractor/ndr.py
index ae1fe866e..53b34f5e6 100644
--- a/youtube_dl/extractor/ndr.py
+++ b/youtube_dl/extractor/ndr.py
@@ -71,7 +71,7 @@ class NDRIE(InfoExtractor):
thumbnails = re.findall(r'''\d+: {src: "([^"]+)"(?: \|\| '[^']+')?, quality: '([^']+)'}''', page)
if thumbnails:
QUALITIES = ['xs', 's', 'm', 'l', 'xl']
- thumbnails.sort(key=lambda thumb: QUALITIES.index(thumb[1]))
+ thumbnails.sort(key=lambda thumb: QUALITIES.index(thumb[1]) if thumb[1] in QUALITIES else -1)
thumbnail = 'http://www.ndr.de' + thumbnails[-1][0]
for format_id in ['lo', 'hi', 'hq']: