Fix preview_thumbnails

use 'deep_get' for storyboard
This commit is contained in:
Jesús
2022-05-30 22:45:08 +08:00
parent 263469cd30
commit 1fbc0cdd46
2 changed files with 8 additions and 9 deletions

View File

@@ -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