1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-02-14 06:16:08 +08:00

[Roosterteeth] Remove _get_thumbnail method, as it was not necessary.

This commit is contained in:
ddmgy 2018-04-07 03:28:16 -04:00
parent ec35ad2396
commit fb69e16adf

View File

@ -96,7 +96,11 @@ class RoosterTeethIE(InfoExtractor):
title = attributes.get('title')
description = attributes.get('caption')
series = attributes.get('show_title')
thumbnail = self._get_thumbnail(data.get('included', {}).get('images'))
images = data.get('included', {}).get('images')
if images and len(images) > 0:
images = images[0]
thumbnail = images.get('attributes', {}).get('thumb')
video_response = self._call_api(
display_id,
@ -154,13 +158,6 @@ class RoosterTeethIE(InfoExtractor):
def _golive_error(self, video_id, member_level):
raise ExtractorError('{0} is not yet live for {1}'.format(video_id, member_level))
def _get_thumbnail(self, images):
if not images or len(images) == 0:
return None
images = images[0]
return images.get('attributes', {}).get('thumb')
def _call_api(self, video_id, path=None, **kwargs):
url = self._API_URL + video_id
if path: