From 4846122f7dfc5d99cb52fb1b6f16d159c20142ca Mon Sep 17 00:00:00 2001 From: Evil-Crab Date: Sun, 17 Mar 2019 00:07:23 +0100 Subject: [PATCH] [vrv] fix thumbnails --- youtube_dl/extractor/vrv.py | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/youtube_dl/extractor/vrv.py b/youtube_dl/extractor/vrv.py index 6c060ae76..16aafb3d3 100644 --- a/youtube_dl/extractor/vrv.py +++ b/youtube_dl/extractor/vrv.py @@ -181,15 +181,17 @@ class VRVIE(VRVBaseIE): }) thumbnails = [] - for thumbnail in video_data.get('images', {}).get('thumbnails', []): - thumbnail_url = thumbnail.get('source') - if not thumbnail_url: - continue - thumbnails.append({ - 'url': thumbnail_url, - 'width': int_or_none(thumbnail.get('width')), - 'height': int_or_none(thumbnail.get('height')), - }) + thumbnails_list = video_data.get('images', {}).get('thumbnail', []) + if thumbnails_list: + for thumbnail in thumbnails_list[0]: + thumbnail_url = thumbnail.get('source') + if not thumbnail_url: + continue + thumbnails.append({ + 'url': thumbnail_url, + 'width': int_or_none(thumbnail.get('width')), + 'height': int_or_none(thumbnail.get('height')), + }) return { 'id': video_id,