New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added CBCPlayerPlaylistIE #7870
Conversation
Yes, that should match it better. Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
Ah OK, that's it. I couldn't get _search_json working for the life of me... Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
Alright, fixed up the mentioned points. Anything I missed or still needs to be done? |
Another issue I've noticed: filtering items in the playlist doesn't really work, because the info fields available in the playlist are different than those available from |
I don't use pypy, but it seems like it might be a bug in pypy's JIT
This is what happens to
Then I think it would be better to not extract any of this extra metadata with the playlist url results, and only use what the video extractor returns, like this: yield self.url_result(f'https://www.cbc.ca/player/play/{video["id"]}', CBCPlayerIE) |
OK, fixed that up. Anything else? |
Authored by: trainman261
IMPORTANT: PRs without the template will be CLOSED
Description of your pull request and other information
This adds support for CBC Player playlists. There doesn't seem to be any direct connection to ThePlatform here, so we need to extract this information from JSON in the website - with the difficulty being that it's not marked as JSON. Therefore some methods are a bit blunt. Improvements are welcome.
One question is still kind of open for me: what is considered a playlist and what not? The sites I added in the tests are more or less clear playlists, although they could also be seen as a collection of videos by category. However, when on the page for an individual video, it will often list other videos in the same category (see the videos from the playlists in the tests). I haven't treated the pages for individual videos as playlists. However, internally, the webpage treats them the same way, so it would be a minor change. Let me know if I should change this.
Fixes #
Template
Before submitting a pull request make sure you have:
In order to be accepted and merged into yt-dlp each piece of code must be in public domain or released under Unlicense. Check all of the following options that apply:
What is the purpose of your pull request?
Copilot Summary
🤖 Generated by Copilot at f692108
Summary
✨📝🔍
Add support for CBC player playlists. Create a new extractor class
CBCPlayerPlaylistIE
incbc.py
and register it in_extractors.py
.Walkthrough
get_element_by_id
function fromutils.py
to find playlist JSON data in HTML page (link)CBCPlayerPlaylistIE
class incbc.py
that inherits fromInfoExtractor
and overrides_real_extract
method (link)