youtube-dl
youtube-dl copied to clipboard
[radiocloud.jp] Add new extractor
I have
- [x] At least skimmed through adding new extractor tutorial and youtube-dl coding conventions sections
- [x] Searched the bugtracker for similar pull requests
One of the following applies
- [x] I am the original author of this code and I am willing to release it under Unlicense
- [ ] I am not the original author of this code but it is in public domain or released under Unlicense (provide reliable evidence)
The purpose of this pull request
- [ ] Bug fix
- [ ] Improvement
- [x] New extractor
- [ ] New feature
Description
This is a new extractor for https://radiocloud.jp/.
This is a audio-only website, if that is not within the scope of this project, my apologies, please close the pull request.
Additionally I can also confirm this is not a website which is based around copyright infringement, from the little Japanese that I know it appears to be the official website for some Japanese radio station.
The website restricts access to older recordings to users without an account, however this restriction is not enforced by anything more than a semi-transparent div preventing clicks, therefore authentication was not implemented in the extractor as it is unnecessary.
The website doesn't have any obvious way of getting the URL for a specific recording, to get one you need to view the RSS feed for a radio program and then use one of the URLs provided there.
The extractor currently makes no attempt to create a playlist of all recordings found on the archive page of a program as there could be quite a few recordings and I personally don't see it as a useful feature, but it could be done.
The extractor also makes no attempt to guess which recording you wish to download if the URL provided does not refer to a specific content_id.
A note about some regex:
file_url = self._search_regex(r'var\s*source\s*=\s*"(.+?)"', webpage, 'url')
I think this regex is a bit iffy, but I couldn't think of a better way.
Thank you for your time.
Edit: removed note about .strip() - I was mistaken.
@dstftw Sorry for the long wait. I've been a bit busy and was for a while happy with my own solution.
I've made the requested changes.
Upon further inspection there is an "end_date" or expiry date on each upload. I did a search across all uploads on the website (with a separate script) and found an upload which expires in 2038. When 2038 is approaching, feel free to ask for a new test :P .
So far I've made do with my own scripts but it would be really neat to get this in youtube_dl so I can use this feature directly with mpv.