diff options
author | James Taylor <user234683@users.noreply.github.com> | 2020-10-21 22:42:07 -0700 |
---|---|---|
committer | James Taylor <user234683@users.noreply.github.com> | 2020-10-21 22:42:07 -0700 |
commit | f8b6db14800806c132c6ec5c587832c0200ada6e (patch) | |
tree | 714b4b253173caa28ee76c10c327f56b02d87881 /youtube/yt_data_extract/watch_extraction.py | |
parent | d3230e8daf6af80f397ec41df2b8a3872b5b9483 (diff) | |
download | yt-local-f8b6db14800806c132c6ec5c587832c0200ada6e.tar.lz yt-local-f8b6db14800806c132c6ec5c587832c0200ada6e.tar.xz yt-local-f8b6db14800806c132c6ec5c587832c0200ada6e.zip |
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.
Diffstat (limited to 'youtube/yt_data_extract/watch_extraction.py')
-rw-r--r-- | youtube/yt_data_extract/watch_extraction.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/youtube/yt_data_extract/watch_extraction.py b/youtube/yt_data_extract/watch_extraction.py index 5e57c15..12a3bf8 100644 --- a/youtube/yt_data_extract/watch_extraction.py +++ b/youtube/yt_data_extract/watch_extraction.py @@ -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) |