aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/yt_dlp_plugins
diff options
context:
space:
mode:
authorgarret <garret@airmail.cc>2024-08-06 11:16:00 +0100
committergarret <garret@airmail.cc>2024-08-06 15:29:05 +0100
commit9d47ffa645cd5e36402925669d87a5c5f7e6b989 (patch)
treee1f08e5e2b22c43de424896863d4e69525b22594 /yt_dlp_plugins
parent913269f5d469d1df3c4ae17be1f243adfa358d98 (diff)
downloadyt-dlp-rajiko-9d47ffa645cd5e36402925669d87a5c5f7e6b989.tar.gz
yt-dlp-rajiko-9d47ffa645cd5e36402925669d87a5c5f7e6b989.tar.bz2
yt-dlp-rajiko-9d47ffa645cd5e36402925669d87a5c5f7e6b989.zip
split mobile extraction into a separate func to use elsewhere
Diffstat (limited to 'yt_dlp_plugins')
-rw-r--r--yt_dlp_plugins/extractor/radiko_mobile.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/yt_dlp_plugins/extractor/radiko_mobile.py b/yt_dlp_plugins/extractor/radiko_mobile.py
index fc19cb4..8bfb163 100644
--- a/yt_dlp_plugins/extractor/radiko_mobile.py
+++ b/yt_dlp_plugins/extractor/radiko_mobile.py
@@ -93,11 +93,8 @@ class RadikoMobileEventIE(_RadikoMobileBaseIE):
"_old_archive_ids": [join_nonempty(program.get("stationId"), old_timestring)],
}
- def _real_extract(self, url):
- event_id = self._match_id(url)
- pageProps, _ = self._get_nextjs_data(url, event_id)
-
- meta = self._get_programme_meta(pageProps.get("program"), pageProps.get("actors"))
+ def _extract_episode(self, program, actors=None):
+ meta = self._get_programme_meta(program, actors)
station = meta.get("channel_id")
start = rtime.RadikoTime.fromtimestamp(meta.get("timestamp"), tz=rtime.JST)
end = rtime.RadikoTime.fromtimestamp(meta.get("release_timestamp"), tz=rtime.JST)
@@ -114,3 +111,8 @@ class RadikoMobileEventIE(_RadikoMobileBaseIE):
"live_status": "was_live",
"container": "m4a_dash", # force fixup, AAC-only HLS
}
+
+ def _real_extract(self, url):
+ event_id = self._match_id(url)
+ pageProps, data = self._get_nextjs_data(url, event_id)
+ return self._extract_episode(pageProps.get("program"), pageProps.get("actors"))