From 6e1fd3a3b275b1ee22432354a9746bc3abcce5d9 Mon Sep 17 00:00:00 2001 From: Benoit Favre Date: Fri, 30 Nov 2018 14:53:04 +1000 Subject: [PATCH] Update parsing of storyboards The format for getting storyboards seems to have changed. They are now available in the 'player_response' field. --- youtube_dl/extractor/youtube.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py index 06964aeaa..adc6d044d 100644 --- a/youtube_dl/extractor/youtube.py +++ b/youtube_dl/extractor/youtube.py @@ -1743,7 +1743,16 @@ class YoutubeIE(YoutubeBaseInfoExtractor): def get_storyboards(video_info): 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: s_parts = s.split('|')