1
0
mirror of https://codeberg.org/polarisfm/youtube-dl synced 2025-01-09 22:57:54 +01:00

[AnimeLab] Add thumbnail extraction

This commit is contained in:
Mariusz Skoneczko 2017-07-19 17:54:12 +10:00
parent 84d4419bad
commit 27076a6e22

View File

@ -119,7 +119,14 @@ class AnimeLabIE(InfoExtractor):
description = raw_data.get('synopsis') or self._og_search_description(webpage, default=None)
# TODO extract thumbnails and other things youtube-dl optionally wants
thumbnail_data = raw_data.get('thumbnailInstance', {})
image_data = thumbnail_data.get('imageInfo', {})
thumbnails = [{
'id': str_or_none(thumbnail_data.get('id')),
'url': image_data.get('fullPath'),
'width': image_data.get('width'),
'height': image_data.get('height'),
}]
formats = []
for video_data in raw_data['videoList']:
@ -181,6 +188,7 @@ class AnimeLabIE(InfoExtractor):
'series': series,
'episode': episode_name,
'episode_number': int_or_none(episode_number),
'thumbnails': thumbnails,
'formats': formats,
}