Update parsing of storyboards
The format for getting storyboards seems to have changed. They are now available in the 'player_response' field.
This commit is contained in:
parent
6bb3efe8df
commit
6e1fd3a3b2
@ -1743,7 +1743,16 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
|||||||
|
|
||||||
def get_storyboards(video_info):
|
def get_storyboards(video_info):
|
||||||
storyboards = []
|
storyboards = []
|
||||||
spec = video_info.get('storyboard_spec', [])
|
|
||||||
|
player_response = video_info.get('player_response', [])
|
||||||
|
if len(player_response) > 0 and isinstance(player_response[0], compat_str):
|
||||||
|
player_response = self._parse_json(
|
||||||
|
player_response[0], video_id, fatal=False)
|
||||||
|
if player_response:
|
||||||
|
spec = [player_response['storyboards']['playerStoryboardSpecRenderer']['spec']]
|
||||||
|
|
||||||
|
else:
|
||||||
|
spec = video_info.get('storyboard_spec', [])
|
||||||
|
|
||||||
for s in spec:
|
for s in spec:
|
||||||
s_parts = s.split('|')
|
s_parts = s.split('|')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user