mirror of
https://github.com/l1ving/youtube-dl
synced 2025-03-28 05:50:01 +08:00
Change accessors for mandatory attributes.
This commit is contained in:
parent
c8d612bfd2
commit
b59130e397
@ -97,13 +97,11 @@ class RoosterTeethIE(InfoExtractor):
|
|||||||
headers=headers,
|
headers=headers,
|
||||||
)
|
)
|
||||||
|
|
||||||
if len(api_response.get('data', [])) == 0:
|
data = api_response['data'][0]
|
||||||
raise ExtractorError('Unable to download video information')
|
|
||||||
data = api_response.get('data')[0]
|
|
||||||
|
|
||||||
attributes = data.get('attributes', {})
|
attributes = data['attributes']
|
||||||
episode = attributes.get('display_title')
|
episode = attributes.get('display_title')
|
||||||
title = attributes.get('title')
|
title = attributes['title']
|
||||||
description = attributes.get('caption')
|
description = attributes.get('caption')
|
||||||
series = attributes.get('show_title')
|
series = attributes.get('show_title')
|
||||||
|
|
||||||
@ -139,8 +137,6 @@ class RoosterTeethIE(InfoExtractor):
|
|||||||
else:
|
else:
|
||||||
raise ExtractorError('Video is not available')
|
raise ExtractorError('Video is not available')
|
||||||
|
|
||||||
if len(video_response.get('data', [])) == 0:
|
|
||||||
raise ExtractorError('Unable to download video information')
|
|
||||||
video_attributes = video_response.get('data')[0].get('attributes')
|
video_attributes = video_response.get('data')[0].get('attributes')
|
||||||
|
|
||||||
m3u8_url = video_attributes.get('url')
|
m3u8_url = video_attributes.get('url')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user