diff options
author | garret1317 <garret@airmail.cc> | 2025-03-06 07:31:41 +0000 |
---|---|---|
committer | garret1317 <garret@airmail.cc> | 2025-03-06 07:35:20 +0000 |
commit | d7aaaaf00397634eeaf7dec7b91d57d1b64bd30a (patch) | |
tree | e66b1295d6bde2f15161824f8f19161de2fe9055 | |
parent | c5e0527b4a1a37c6aa3431e3936618e5644de218 (diff) | |
download | yt-dlp-rajiko-d7aaaaf00397634eeaf7dec7b91d57d1b64bd30a.tar.gz yt-dlp-rajiko-d7aaaaf00397634eeaf7dec7b91d57d1b64bd30a.tar.bz2 yt-dlp-rajiko-d7aaaaf00397634eeaf7dec7b91d57d1b64bd30a.zip |
filter out "cul_area_id" in search params - HTTP Error 415
site used to use "cul_area_id" in the search url, now it uses "cur_area_id" (with an r)
and it outright rejects the old one with HTTP Error 415: Unsupported Media Type
probably better to patch in the extractor than to break peoples scripts etc - site does this too
idk why they felt the need to break the old one
-rw-r--r-- | yt_dlp_plugins/extractor/radiko.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/yt_dlp_plugins/extractor/radiko.py b/yt_dlp_plugins/extractor/radiko.py index 3839aa9..9ca353b 100644 --- a/yt_dlp_plugins/extractor/radiko.py +++ b/yt_dlp_plugins/extractor/radiko.py @@ -609,6 +609,11 @@ class RadikoSearchIE(InfoExtractor): # urllib.parse interprets the path as just one giant fragment because of the #, so we hack it away queries = parse_qs(url) + if queries.get("cul_area_id"): + queries["cur_area_id"] = queries.pop("cul_area_id") + # site used to use "cul_area_id" in the search url, now it uses "cur_area_id" (with an r) + # and outright rejects the old one with HTTP Error 415: Unsupported Media Type + search_url = update_url_query("https://radiko.jp/v3/api/program/search", { **queries, "uid": "".join(random.choices("0123456789abcdef", k=32)), |