Redo fix for failure mode 1 in issue #22
Previous fix didn't work. Should work now. The non-embedded player response can still be present but the urls will be missing.
This commit is contained in:
@@ -478,10 +478,6 @@ def extract_watch_info(polymer_json):
|
||||
else:
|
||||
embedded_player_response = {}
|
||||
|
||||
# see https://github.com/user234683/youtube-local/issues/22#issuecomment-706395160
|
||||
info['player_response_missing'] = not (
|
||||
player_response or embedded_player_response)
|
||||
|
||||
# captions
|
||||
info['automatic_caption_languages'] = []
|
||||
info['manual_caption_languages'] = []
|
||||
@@ -514,6 +510,10 @@ def extract_watch_info(polymer_json):
|
||||
if not info['formats']:
|
||||
_extract_formats(info, player_response)
|
||||
|
||||
# see https://github.com/user234683/youtube-local/issues/22#issuecomment-706395160
|
||||
info['player_urls_missing'] = (
|
||||
not info['formats'] and not embedded_player_response)
|
||||
|
||||
# playability errors
|
||||
_extract_playability_error(info, player_response)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user