diff options
author | James Taylor <user234683@users.noreply.github.com> | 2020-05-27 12:15:41 -0700 |
---|---|---|
committer | James Taylor <user234683@users.noreply.github.com> | 2020-05-27 12:15:41 -0700 |
commit | bdac6a23028152c77e82716bdd82db9e80c2685b (patch) | |
tree | 84c23690905b062ae7dd29ae2d132e614dfbd806 /youtube | |
parent | 85db7e46ed42a74885f9bc6ff9d6bc519de8f98e (diff) | |
download | yt-local-bdac6a23028152c77e82716bdd82db9e80c2685b.tar.lz yt-local-bdac6a23028152c77e82716bdd82db9e80c2685b.tar.xz yt-local-bdac6a23028152c77e82716bdd82db9e80c2685b.zip |
Fix broken signature decryption
The base.js url format changed, so the identifier at the end
was no longer unique. So it was using the wrong cached decryption
function
Changes the identifier to just be the whole url so
this won't happen again.
Diffstat (limited to 'youtube')
-rw-r--r-- | youtube/yt_data_extract/watch_extraction.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/youtube/yt_data_extract/watch_extraction.py b/youtube/yt_data_extract/watch_extraction.py index 7318a95..514b9c8 100644 --- a/youtube/yt_data_extract/watch_extraction.py +++ b/youtube/yt_data_extract/watch_extraction.py @@ -458,7 +458,8 @@ def extract_watch_info(polymer_json): info['base_js'] = deep_get(top_level, 'player', 'assets', 'js') if info['base_js']: info['base_js'] = normalize_url(info['base_js']) - info['player_name'] = get(info['base_js'].split('/'), -2) + # must uniquely identify url + info['player_name'] = urllib.parse.urlparse(info['base_js']).path else: info['player_name'] = None |