Skip to content

Commit

Permalink
Fix broken signature decryption
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
user234683 committed May 27, 2020
1 parent 85db7e4 commit bdac6a2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion youtube/yt_data_extract/watch_extraction.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit bdac6a2

Please sign in to comment.