From 33fe77a62487b5514974a9a1518b1ec1e4c22044 Mon Sep 17 00:00:00 2001 From: garret Date: Mon, 8 May 2023 20:42:43 +0100 Subject: add debuggering stuff --- yt_dlp_plugins/extractor/radiko.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'yt_dlp_plugins') diff --git a/yt_dlp_plugins/extractor/radiko.py b/yt_dlp_plugins/extractor/radiko.py index 863c9aa..7ac4aee 100755 --- a/yt_dlp_plugins/extractor/radiko.py +++ b/yt_dlp_plugins/extractor/radiko.py @@ -433,9 +433,11 @@ class _RadikoBaseIE(InfoExtractor): def _negotiate_token(self, station_region): info = self._generate_random_info() - _, auth1_handle = self._download_webpage_handle('https://radiko.jp/v2/api/auth1', None, + response, auth1_handle = self._download_webpage_handle('https://radiko.jp/v2/api/auth1', None, 'Authenticating: step 1', headers = self._generate_random_info()) + self.write_debug(response) + auth1_header = auth1_handle.info() auth_token = auth1_header['X-Radiko-AuthToken'] key_length = int(auth1_header['X-Radiko-KeyLength']) @@ -478,6 +480,7 @@ class _RadikoBaseIE(InfoExtractor): self._user = cachedata.get("user") response = self._download_webpage('https://radiko.jp/v2/api/auth_check', station_region, 'Checking cached token', headers = token, expected_status = 401) + self.write_debug(response) if response != "OK": token = self._negotiate_token(station_region) else: -- cgit v1.2.3-70-g09d2