From bdac6a23028152c77e82716bdd82db9e80c2685b Mon Sep 17 00:00:00 2001 From: James Taylor Date: Wed, 27 May 2020 12:15:41 -0700 Subject: 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. --- youtube/yt_data_extract/watch_extraction.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'youtube') 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 -- cgit v1.2.3