garret1317 / yt-dlp-rajiko

improved radiko.jp extractor for yt-dlp
https://427738.xyz/yt-dlp-rajiko/
Other
23 stars 1 forks source link

How to designate region code #20

Closed un-nerv closed 7 months ago

un-nerv commented 8 months ago

I know that this is a ridiculous question , but I couldn’t understand how to designate region code to bypass radiko’s geo-blocking.

garret1317 commented 8 months ago

you don't the extractor downloads a list of all the stations, and their associated region code then when you want to download something, it finds the station in that list, and uses gps coordinates corresponding to that region code to authenticate/get the token so all you have to do is give an url to download つまり、URLだけで大丈夫です

if you want, you can change the regions it uses by editing the cached data on my linux machine it's in ~/.cache/yt-dlp/rajiko/region_index.json, but i'm afraid i'm not sure where it would be on windows - this bit from the yt-dlp readme might help but there's no way to specify a region yourself from the command line

garret1317 commented 7 months ago

@un-nerv did this answer your question? please let me know so i can close this issue or try to help you further

un-nerv commented 7 months ago

Sory for my late reply. Finally I can download geo_blocked programs from radiko by using this amazing tool. Thank you for your advise!!

By the way i faced another problem. I entered this to terminal. ↓

yt-dlp https://radiko.jp/#!/search/live?key=%20&filter=&start_day=&end_day=&region_id=all&area_id=JP13&cul_area_id=JP13&page_idx=0

when downloading-webpages-seequence reached to 200, yt-dlp stopped downloading pages. Is this problem of plugin or yt-dlp?

garret1317 commented 7 months ago

np, you're welcome

re: your other question, it looks like a radiko issue

50 items in each (plugin) page, maxes out at 200 pages 200x50 = 10000 so it maxes out at 10k items

12 items in each page on the site 10000/12 = 833.333333333 and see how page 833 works, but page 834 doesn't

either way, please don't do that, it'll absolutely hammer radiko's servers (and maybe get you banned or the plugin noticed) and if it works then you'll be downloading ~30gb per week, per station (~30tb/week total) which i assume is not what you want the plugin's not designed for big industrial-scale scrapers, if you really want to run one of those then you should write your own code for it that uses the APIs more efficiently