handle missing storyboard

Signed-off-by: Jesús <heckyel@hyperbola.info>
This commit is contained in:
zrose584
2022-01-17 00:49:49 +01:00
committed by Jesús
parent 63c92e0c4e
commit a5ef801c07
3 changed files with 6 additions and 4 deletions

View File

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