diff options
author | garret <garret@airmail.cc> | 2024-08-05 09:47:55 +0100 |
---|---|---|
committer | garret <garret@airmail.cc> | 2024-08-05 09:48:30 +0100 |
commit | b0ae964f2d881235c4d436b8c7c1c3a04c7800f4 (patch) | |
tree | 31da1fdbfc46f0e1a9bb7ca1aa59fa385e0ea032 /yt_dlp_plugins/extractor/radiko.py | |
parent | 340b1a5bf6697bb28d533a264ad9fa03982bcf44 (diff) | |
download | yt-dlp-rajiko-b0ae964f2d881235c4d436b8c7c1c3a04c7800f4.tar.gz yt-dlp-rajiko-b0ae964f2d881235c4d436b8c7c1c3a04c7800f4.tar.bz2 yt-dlp-rajiko-b0ae964f2d881235c4d436b8c7c1c3a04c7800f4.zip |
construct the chapter API url properly (not stringmashing)
Diffstat (limited to 'yt_dlp_plugins/extractor/radiko.py')
-rw-r--r-- | yt_dlp_plugins/extractor/radiko.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/yt_dlp_plugins/extractor/radiko.py b/yt_dlp_plugins/extractor/radiko.py index 12db23b..7d06d37 100644 --- a/yt_dlp_plugins/extractor/radiko.py +++ b/yt_dlp_plugins/extractor/radiko.py @@ -468,10 +468,11 @@ class RadikoTimeFreeIE(_RadikoBaseIE): )}, (actual_start, actual_end), int_or_none(prog.get("ts_in_ng")) != 2 def _extract_chapters(self, station, start, end, video_id=None): - start_str = urllib.parse.quote(start.isoformat()) - end_str = urllib.parse.quote(end.isoformat()) - data = self._download_json(f"https://api.radiko.jp/music/api/v1/noas/{station}?start_time_gte={start_str}&end_time_lt={end_str}", - video_id, note="Downloading tracklist").get("data") + api_url = update_url_query(f"https://api.radiko.jp/music/api/v1/noas/{station}", { + "start_time_gte": start.isoformat(), + "end_time_lt": end.isoformat(), + }) + data = self._download_json(api_url, video_id, note="Downloading tracklist").get("data") chapters = [] for track in data: |