aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/vimeo.py
diff options
context:
space:
mode:
authorSergey M. <dstftw@gmail.com>2014-02-28 18:00:12 +0700
committerSergey M. <dstftw@gmail.com>2014-02-28 18:00:12 +0700
commitc0e5d856314bf5fb7162902c53c9df0be1a315c0 (patch)
tree1e17c4de174e405134d46387f04408b364b4d0e6 /youtube_dl/extractor/vimeo.py
parentca7fa3dcb321f3de429cac9e83fda737ac0be4c9 (diff)
[vimeo] Improve thumbnail extraction
Diffstat (limited to 'youtube_dl/extractor/vimeo.py')
-rw-r--r--youtube_dl/extractor/vimeo.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/youtube_dl/extractor/vimeo.py b/youtube_dl/extractor/vimeo.py
index ec6aad592..10c3d992d 100644
--- a/youtube_dl/extractor/vimeo.py
+++ b/youtube_dl/extractor/vimeo.py
@@ -220,8 +220,10 @@ class VimeoIE(SubtitlesInfoExtractor):
# Extract video thumbnail
video_thumbnail = config["video"].get("thumbnail")
- if video_thumbnail is None and config["video"].get("thumbs"):
- _, video_thumbnail = sorted((int(width), t_url) for (width, t_url) in config["video"]["thumbs"].items())[-1]
+ if video_thumbnail is None:
+ video_thumbs = config["video"].get("thumbs")
+ if video_thumbs and isinstance(video_thumbs, dict):
+ _, video_thumbnail = sorted((int(width), t_url) for (width, t_url) in video_thumbs.items())[-1]
# Extract video description
video_description = None