-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
[BritishCouncil] Add new extractor #25424
Conversation
You must delegate to viddler extractor not inherit from it. |
Right, I understand. Sorry, didn't quite understand the convention. |
|
Thanks, I've updated my regex to meet coding conventions. All three embed options in your link will now be caught by the generic extractor. Let me know any additional touch ups are required. Thanks! |
webpage) | ||
if mobj is not None: | ||
return ViddlerIE._build_url_result(mobj.group('id')) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move embed extraction code to ViddlerIE._extract_urls
.
@staticmethod | ||
def _url_for_id(id): | ||
return 'http://www.viddler.com/v/%s' % id | ||
|
||
@classmethod | ||
def _build_url_result(cls, id): | ||
return cls.url_result(cls._url_for_id(id), | ||
ie=cls.ie_key()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inline.
5e26784
to
da2069f
Compare
Please follow the guide below
x
into all the boxes [ ] relevant to your pull request (like that [x])Before submitting a pull request make sure you have:
In order to be accepted and merged into youtube-dl each piece of code must be in public domain or released under Unlicense. Check one of the following options:
What is the purpose of your pull request?
Description of your pull request and other information
New extractor for britishcouncil.org videos as requested by #25368
As the website uses Viddler as a provider, I've added a base Viddler IE to limit code repetition.
All tests pass and code has been check with flake8.