From 1fbc0cdd466eff4b79d2fe1959b407b791f040ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs?= Date: Mon, 30 May 2022 22:45:08 +0800 Subject: Fix preview_thumbnails use 'deep_get' for storyboard --- youtube/yt_data_extract/watch_extraction.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (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 6b1b30d..a5ac0f5 100644 --- a/youtube/yt_data_extract/watch_extraction.py +++ b/youtube/yt_data_extract/watch_extraction.py @@ -669,8 +669,7 @@ 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 - sb = player_response.get('storyboards') - info['storyboard_spec_url'] = sb['playerStoryboardSpecRenderer']['spec'] if sb else None + info['storyboard_spec_url'] = deep_get(player_response, 'storyboards', 'playerStoryboardSpecRenderer', 'spec') return info -- cgit v1.2.3