diff options
author | garret <garret@airmail.cc> | 2023-09-30 02:53:14 +0100 |
---|---|---|
committer | garret <garret@airmail.cc> | 2023-09-30 02:53:14 +0100 |
commit | cb0e113e48651d085a3b36c2a3476a0bf70099bc (patch) | |
tree | 957c883dbcbe50c000bd0fa3d5fd2500e29e4d37 | |
parent | 601facf0d77fa82dfa34a5bfc6898b5fe1500336 (diff) | |
download | yt-dlp-rajiko-cb0e113e48651d085a3b36c2a3476a0bf70099bc.tar.gz yt-dlp-rajiko-cb0e113e48651d085a3b36c2a3476a0bf70099bc.tar.bz2 yt-dlp-rajiko-cb0e113e48651d085a3b36c2a3476a0bf70099bc.zip |
rewrite README
-rw-r--r-- | README.md | 34 |
1 files changed, 20 insertions, 14 deletions
@@ -5,25 +5,21 @@ See [yt-dlp plugins](https://github.com/yt-dlp/yt-dlp#plugins) for more details. This plugin adds an improved [radiko](https://radiko.jp) extractor to yt-dlp. -It bypasses the region blocks entirely, meaning you can download programmes and listen to stations from any prefecture, even from outside Japan. +It bypasses radiko's geo-block using the same technique as the [rajiko](https://github.com/jackyzy823/rajiko/) browser extension by jackyzy823 (from which this plugin gets its name). You can read their write-up (in Chinese) [here](https://jackyzy823.github.io/tech/battle-with-radiko.html). -It provides more metadata for timefree programmes, and less for live station streams (it's a station that happens to be playing a programme at that point in time, not a programme itself). +More metadata is extracted for timefree programmes, including tracklists (as chapters). +Only the station metadata is extracted for live streams, not the programme that's airing at the time. -You should use `-N` (multi-threaded download) for timefree, otherwise it'll be extremely slow. +You should use `-N` (multi-threaded download) to increase download speed for timefree programmes. -Tracklists can be embedded as chapters for timefree programmes. The accuracy of the timestamps varies - it depends on what the stations provide. The duration/end time of the song is not provided at all, so you may get very long chapters if there's a big gap between songs. +You can somewhat automate downloading programmes by using the search page. +For instance, if I wanted all episodes of JET STREAM from K-MIX, i'd search for `jet stream` with the region set to Shizuoka (`JP22`). I'd also filter for just timefree, to avoid needlessly extracting yet-to-air programmes. -You can download multiple programmes in one go by downloading the search pages. -For example, to download all available episodes of JET STREAM on Tokyo FM, [search for jet stream and set 地域 to 東京](https://radiko.jp/#!/search/live?key=jet%20stream&area_id=JP13&cul_area_id=JP13&page_idx=0). yt-dlp the url, and it'll download every result. +Personally, I have a shell script with a load of search URLs that are piped to yt-dlp. I run this script when I want to download new episodes of the programmes I listen to. ----- - -The authentication code is based heavily on [the work of jackyzy823](https://github.com/jackyzy823/rajiko/), which is where the name of the plugin comes from. -It also borrows bits from [Lesmiscore's extractor](https://github.com/yt-dlp/yt-dlp/blob/d1795f4a6af99c976c9d3ea2dabe5cf4f8965d3c/yt_dlp/extractor/radiko.py) from yt-dlp proper. +An effort is made to support share links and radiko embeds. However, I don't use these features often myself, so they don't recieve regular testing. Issues are welcome. -I've been advised that it would be risky to merge this extractor into yt-dlp proper as it uses a key reverse-engineered from the mobile app, so it's a plugin instead. - -If you prefer not to take the risk, the `pc_html5` "law abiding citizen mode" branch uses the website's key, the same as in yt-dlp (in fact, the key-grabbing code is copied directly from lesmiscore's extractor). Premium accounts are not supported at this time. +This extractor uses an API key obtained by reverse-engineering the radiko mobile app. As such, I've been advised that it would be risky to merge it into yt-dlp proper. ## Installation @@ -33,10 +29,20 @@ You can install this package with pip: ``` python3 -m pip install -U https://github.com/garret1317/yt-dlp-rajiko/archive/master.zip ``` -but you probably shouldn't, i'm not nearly religious enough about updating the version number +but i don't update the version number ever, so i'm not sure how well that'll work when you need to update See [installing yt-dlp plugins](https://github.com/yt-dlp/yt-dlp#installing-plugins) for the other methods this plugin package can be installed. + +## Acknowledgements + + +The mobile spoofing code is based heavily on the [rajiko](https://github.com/jackyzy823/rajiko/) browser extension by jackyzy823, released under the Unlicense. +In particular, the fake phone details and GPS coordinate generation code was copied almost verbatim, with just a few changes for python syntax. +And of course, the mobile API key itself, without which this extractor would not have been possible, was originally obtained by jackyzy823. + +The authentication code, and some parts of the metadata extraction, were adapted from [yt-dlp's radiko extractor](https://github.com/yt-dlp/yt-dlp/blob/d1795f4a6af99c976c9d3ea2dabe5cf4f8965d3c/yt_dlp/extractor/radiko.py), which was primarily authored by Lesmiscore (also released under the Unlicense). + ---- すみません、日本語はまだあまり上手ではありません。だから、このREADMEは英語で書きました。 |