mirror of
https://github.com/l1ving/youtube-dl
synced 2025-02-19 08:45:35 +08:00
[Roosterteeth] Remove _get_thumbnail method, as it was not necessary.
This commit is contained in:
parent
ec35ad2396
commit
fb69e16adf
@ -96,7 +96,11 @@ class RoosterTeethIE(InfoExtractor):
|
|||||||
title = attributes.get('title')
|
title = attributes.get('title')
|
||||||
description = attributes.get('caption')
|
description = attributes.get('caption')
|
||||||
series = attributes.get('show_title')
|
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(
|
video_response = self._call_api(
|
||||||
display_id,
|
display_id,
|
||||||
@ -154,13 +158,6 @@ class RoosterTeethIE(InfoExtractor):
|
|||||||
def _golive_error(self, video_id, member_level):
|
def _golive_error(self, video_id, member_level):
|
||||||
raise ExtractorError('{0} is not yet live for {1}'.format(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):
|
def _call_api(self, video_id, path=None, **kwargs):
|
||||||
url = self._API_URL + video_id
|
url = self._API_URL + video_id
|
||||||
if path:
|
if path:
|
||||||
|
Loading…
Reference in New Issue
Block a user