From 88d62206b41723ba85174bd4d33469089d23334b Mon Sep 17 00:00:00 2001 From: Jeff Huffman Date: Thu, 19 May 2022 17:37:04 -0700 Subject: [PATCH] [crunchyroll:beta] Fix extractor after API change (#3801) Closes #2052 Authored by: Burve, tejing1 --- yt_dlp/extractor/crunchyroll.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/yt_dlp/extractor/crunchyroll.py b/yt_dlp/extractor/crunchyroll.py index bb1dbbaad7..1d186bd388 100644 --- a/yt_dlp/extractor/crunchyroll.py +++ b/yt_dlp/extractor/crunchyroll.py @@ -728,11 +728,12 @@ def _get_params(self, lang): headers={ 'Authorization': auth_response['token_type'] + ' ' + auth_response['access_token'] }) - bucket = policy_response['cms']['bucket'] + cms = traverse_obj(policy_response, 'cms_beta', 'cms') + bucket = cms['bucket'] params = { - 'Policy': policy_response['cms']['policy'], - 'Signature': policy_response['cms']['signature'], - 'Key-Pair-Id': policy_response['cms']['key_pair_id'] + 'Policy': cms['policy'], + 'Signature': cms['signature'], + 'Key-Pair-Id': cms['key_pair_id'] } locale = traverse_obj(initial_state, ('localization', 'locale')) if locale: