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
[universcience] Add new extractor #10405
base: master
Are you sure you want to change the base?
Conversation
format_url = xpath_text(media_source, 'source', fatal=True) | ||
media_label = xpath_attr(media_source, './streaming_type', 'label') | ||
media_width = self._search_regex( | ||
r'.* (\d*) x \d*', media_label, 'width', default='None', fatal=False) |
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.
.*
at border does not make any sense. With \d*
you allow empty match. Using default implies non fatal. What is the point of 'None'
string for default?
Here the new version. I followed your advice (thank you). Regexp is always a work in progress (for me !). |
youtube_dl/extractor/extractors.py
Outdated
@@ -116,6 +116,7 @@ | |||
from .camwithher import CamWithHerIE | |||
from .canalplus import CanalplusIE | |||
from .canalc2 import Canalc2IE | |||
from .canalu import CanalUIE |
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.
Irrelevant to this PR.
OK, the "import" is irrelevant. |
@flatgreen The line @dstftw mentions removes anything matching |
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:
What is the purpose of your pull request?
Description of your pull request and other information
This is an extractor for a french science videos site : universcience.tv
example