aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/yt_dlp_plugins/extractor/radiko.py
diff options
context:
space:
mode:
authorgarret <garret@airmail.cc>2023-09-28 01:51:36 +0100
committergarret <garret@airmail.cc>2023-09-28 01:51:36 +0100
commit601facf0d77fa82dfa34a5bfc6898b5fe1500336 (patch)
tree5134649807825788c1b9afda7bcdf9a43215f4c3 /yt_dlp_plugins/extractor/radiko.py
parent28701271aeb9d6796e89abb8d5d4ac054fb2dcf0 (diff)
downloadyt-dlp-rajiko-601facf0d77fa82dfa34a5bfc6898b5fe1500336.tar.gz
yt-dlp-rajiko-601facf0d77fa82dfa34a5bfc6898b5fe1500336.tar.bz2
yt-dlp-rajiko-601facf0d77fa82dfa34a5bfc6898b5fe1500336.zip
Make token cache check less dumb
Diffstat (limited to 'yt_dlp_plugins/extractor/radiko.py')
-rwxr-xr-xyt_dlp_plugins/extractor/radiko.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/yt_dlp_plugins/extractor/radiko.py b/yt_dlp_plugins/extractor/radiko.py
index dd0c380..656fefc 100755
--- a/yt_dlp_plugins/extractor/radiko.py
+++ b/yt_dlp_plugins/extractor/radiko.py
@@ -495,11 +495,9 @@ class _RadikoBaseIE(InfoExtractor):
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:
- token = self._negotiate_token(station_region)
- return token
+ if response == "OK":
+ return token
+ return self._negotiate_token(station_region)
def _get_station_meta(self, region, station_id):
cachedata = self.cache.load("rajiko", station_id)