From f07f642a1d79fc964a3625a32eac65d616cd369a Mon Sep 17 00:00:00 2001 From: garret Date: Sun, 4 Jun 2023 00:50:09 +0100 Subject: add share link extractor --- yt_dlp_plugins/extractor/radiko.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'yt_dlp_plugins/extractor') 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) -- cgit v1.2.3-70-g09d2