Skip to content
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

[ie/nfb] Add series extractor, episode support, onf.ca support #8997

Merged
merged 12 commits into from Jan 31, 2024

Conversation

rrgomes
Copy link
Contributor

@rrgomes rrgomes commented Jan 14, 2024

IMPORTANT: PRs without the template will be CLOSED

Description of your pull request and other information

Extractor for ONF (Office National du Film), the French-language website of Canada'a NFB (National Film Board). Code is based on the existing NFB extractor.

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:

  • 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)

What is the purpose of your pull request?

@seproDev seproDev added the site-request Request to support a new website label Jan 14, 2024
@pukkandan
Copy link
Member

Revert changes to supportedsites.md. It'll be auto-generated at release

@rrgomes
Copy link
Contributor Author

rrgomes commented Jan 18, 2024

Reverted changes to supportedsites.md.

@bashonly
Copy link
Member

bashonly commented Jan 21, 2024

It looks like this is the NFBIE copied and pasted with the only _VALID_URL and _download_webpage() URLs changed. Instead of doing it this way, we should move the NFBIE code to a baseclass (e.g. NFBBaseIE) and subclass both ONFIE and NFBIE from it. All of these extractor classes can go in nfb.py

Or, if there are no ID collisions, we could even just modify NFBIE to handle both types of URLs

@bashonly bashonly added the pending-fixes PR has had changes requested label Jan 21, 2024
@bashonly bashonly linked an issue Jan 21, 2024 that may be closed by this pull request
11 tasks
@rrgomes
Copy link
Contributor Author

rrgomes commented Jan 22, 2024

ONF and NFB both subclassed from a base class in nfb.py as suggested.

@bashonly bashonly changed the title [ONF] Add extractor [ie/nfb] Add series extractor, episode support, onf.ca support Jan 29, 2024
@bashonly bashonly added pending-review PR needs a review and removed pending-fixes PR has had changes requested labels Jan 29, 2024
@bashonly
Copy link
Member

Found that NFB and ONF should not be split into separate extractors, and that episodes weren't supported despite using the same URL format, so I rewrote it

Authored by: bashonly
Authored by: bashonly
Authored by: bashonly
Authored by: bashonly
yt_dlp/extractor/nfb.py Outdated Show resolved Hide resolved
bashonly and others added 2 commits January 31, 2024 15:45
Co-authored-by: sepro <4618135+seproDev@users.noreply.github.com>
@bashonly bashonly removed the pending-review PR needs a review label Jan 31, 2024
@bashonly bashonly self-assigned this Jan 31, 2024
@bashonly bashonly merged commit 4b8b0dd into yt-dlp:master Jan 31, 2024
6 checks passed
FletcherD pushed a commit to FletcherD/yt-dlp that referenced this pull request Feb 14, 2024
Closes yt-dlp#8198
Authored by: bashonly, rrgomes

Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
@rrgomes rrgomes deleted the ONF branch March 31, 2024 19:52
@rrgomes rrgomes restored the ONF branch March 31, 2024 19:52
@rrgomes rrgomes deleted the ONF branch March 31, 2024 19:53
aalsuwaidi pushed a commit to aalsuwaidi/yt-dlp that referenced this pull request Apr 21, 2024
Closes yt-dlp#8198
Authored by: bashonly, rrgomes

Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
site-request Request to support a new website
Projects
None yet
Development

Successfully merging this pull request may close these issues.

onf.ca - French version of NFB - site support request
4 participants