From a5ef801c073e2be932430b13ab7c0524e1c1e1b6 Mon Sep 17 00:00:00 2001 From: zrose584 <57181548+zrose584@users.noreply.github.com> Date: Mon, 17 Jan 2022 00:49:49 +0100 Subject: handle missing storyboard MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jesús --- youtube/yt_data_extract/watch_extraction.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'youtube/yt_data_extract') diff --git a/youtube/yt_data_extract/watch_extraction.py b/youtube/yt_data_extract/watch_extraction.py index 309c85c..d90d9ad 100644 --- a/youtube/yt_data_extract/watch_extraction.py +++ b/youtube/yt_data_extract/watch_extraction.py @@ -650,7 +650,8 @@ def extract_watch_info(polymer_json): # other stuff info['author_url'] = 'https://www.youtube.com/channel/' + info['author_id'] if info['author_id'] else None - info['storyboard_spec_url'] = player_response['storyboards']['playerStoryboardSpecRenderer']['spec'] + sb = player_response.get('storyboards') + info['storyboard_spec_url'] = sb['playerStoryboardSpecRenderer']['spec'] if sb else None return info -- cgit v1.2.3