diff options
author | garret <garret@airmail.cc> | 2023-06-04 00:50:09 +0100 |
---|---|---|
committer | garret <garret@airmail.cc> | 2023-06-04 00:50:09 +0100 |
commit | f07f642a1d79fc964a3625a32eac65d616cd369a (patch) | |
tree | 49c001fcb9f6fe03bb9e8548d3896bf710d36dcb | |
parent | 58d380a44dd8f3898e38b6f6c281b98d978ff122 (diff) | |
download | yt-dlp-rajiko-f07f642a1d79fc964a3625a32eac65d616cd369a.tar.gz yt-dlp-rajiko-f07f642a1d79fc964a3625a32eac65d616cd369a.tar.bz2 yt-dlp-rajiko-f07f642a1d79fc964a3625a32eac65d616cd369a.zip |
add share link extractor
-rwxr-xr-x | yt_dlp_plugins/extractor/radiko.py | 10 |
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) |