aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorgarret <garret@airmail.cc>2023-06-04 00:50:09 +0100
committergarret <garret@airmail.cc>2023-06-04 00:50:09 +0100
commitf07f642a1d79fc964a3625a32eac65d616cd369a (patch)
tree49c001fcb9f6fe03bb9e8548d3896bf710d36dcb
parent58d380a44dd8f3898e38b6f6c281b98d978ff122 (diff)
downloadyt-dlp-rajiko-f07f642a1d79fc964a3625a32eac65d616cd369a.tar.gz
yt-dlp-rajiko-f07f642a1d79fc964a3625a32eac65d616cd369a.tar.bz2
yt-dlp-rajiko-f07f642a1d79fc964a3625a32eac65d616cd369a.zip
add share link extractor
-rwxr-xr-xyt_dlp_plugins/extractor/radiko.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/yt_dlp_plugins/extractor/radiko.py b/yt_dlp_plugins/extractor/radiko.py
index 4dd050e..f7b575b 100755
--- a/yt_dlp_plugins/extractor/radiko.py
+++ b/yt_dlp_plugins/extractor/radiko.py
@@ -837,3 +837,13 @@ class RadikoSearchIE(_RadikoBaseIE):
for station, time in [ep.values() for ep in results]]
# TODO: have traverse_obj return a tuple, not a dict
}
+
+class RadikoShareIE(_RadikoBaseIE):
+ _VALID_URL = "https?://(?:www\.)?radiko\.jp/share/"
+
+ def _real_extract(self, url):
+ queries = parse_qs(url)
+ station = traverse_obj(queries, ("sid", 0))
+ time = traverse_obj(queries, ("t", 0))
+
+ return self.url_result(f"https://radiko.jp/#!/ts/{station}/{time}", RadikoTimeFreeIE)