From 5509e05d3494b5073ae5750ddcf461b62529ea89 Mon Sep 17 00:00:00 2001 From: ddmgy Date: Fri, 13 Jul 2018 17:19:30 -0400 Subject: [PATCH] Get list of all available thumbnails, rather than just the largest. --- youtube_dl/extractor/roosterteeth.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/youtube_dl/extractor/roosterteeth.py b/youtube_dl/extractor/roosterteeth.py index 9e2353dc8..52ffb4436 100644 --- a/youtube_dl/extractor/roosterteeth.py +++ b/youtube_dl/extractor/roosterteeth.py @@ -107,7 +107,11 @@ class RoosterTeethIE(InfoExtractor): description = attributes.get('caption') series = attributes.get('show_title') - thumbnail = try_get(data, lambda x: x['included']['images'][0]['attributes']['large'], compat_str) + thumbnails = [] + for size in ['thumb', 'small', 'medium', 'large']: + thumbnail = try_get(data, lambda x: x['included']['images'][0]['attributes'][size], compat_str) + if thumbnail: + thumbnails.append({'url': thumbnail}) video_response = self._call_api( display_id, @@ -154,7 +158,7 @@ class RoosterTeethIE(InfoExtractor): 'display_id': display_id, 'title': title, 'description': description, - 'thumbnail': thumbnail, + 'thumbnails': thumbnails, 'series': series, 'episode': episode, 'formats': formats,