-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
[Lumni] Add new extractor #26532
[Lumni] Add new extractor #26532
Conversation
5e26784
to
da2069f
Compare
Hi, Why has the "Lumni" commit not be applied? I'm eagerly waiting for it XD Thanks |
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.
Happy to re-review and merge once FranceTV IE is working again.
@@ -580,6 +580,7 @@ | |||
from .localnews8 import LocalNews8IE | |||
from .lovehomeporn import LoveHomePornIE | |||
from .lrt import LRTIE | |||
from .lumni import LumniIE, LumniPlaylistIE |
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.
More maintainable:
from .lumni import LumniIE, LumniPlaylistIE | |
from .lumni import ( | |
LumniIE, | |
LumniPlaylistIE, | |
) |
entries = [self.url_result( | ||
'https://lumni.fr/video/%s' % video_id, | ||
ie=LumniIE.ie_key(), video_id=video_id) | ||
for video_id in orderedSet(re.findall( | ||
r'<a[^>]+\bhref=["\']/video/([0-9a-z-]+)', webpage))] | ||
|
||
playlist_title = self._og_search_title(webpage) | ||
|
||
return self.playlist_result(entries, playlist_id, playlist_title) |
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.
There's a utility method for this; also the regex can be relaxed:
entries = [self.url_result( | |
'https://lumni.fr/video/%s' % video_id, | |
ie=LumniIE.ie_key(), video_id=video_id) | |
for video_id in orderedSet(re.findall( | |
r'<a[^>]+\bhref=["\']/video/([0-9a-z-]+)', webpage))] | |
playlist_title = self._og_search_title(webpage) | |
return self.playlist_result(entries, playlist_id, playlist_title) | |
playlist_title = self._og_search_title(webpage) | |
return self.playlist_from_matches( | |
re.findall(r'''<a\b[^>]+\bhref\s*=\s*["']/video/([0-9a-z-]+)''', webpage), | |
playlist_id, playlist_title, | |
getter=lambda x: 'https://lumni.fr/video/' + x, | |
ie=LumniIE.ie_key()) |
'title': 'Les Fondamentaux : Vocabulaire', | ||
}, | ||
'playlist_mincount': 39 |
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.
Currently these are right:
'title': 'Les Fondamentaux : Vocabulaire', | |
}, | |
'playlist_mincount': 39 | |
'title': 're:(?i)^Les Fondamentaux : Vocabulaire$', | |
}, | |
'playlist_mincount': 25 |
|
||
from .common import InfoExtractor | ||
from .francetv import FranceTVIE | ||
from ..utils import orderedSet |
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.
Removed by final suggestion:
from ..utils import orderedSet |
full_id = 'francetv:%s' % video_id | ||
|
||
return self.url_result(full_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.
Roll this together:
full_id = 'francetv:%s' % video_id | |
return self.url_result(full_id, | |
return self.url_result( 'francetv:' + video_id, |
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
French website for school children.
Requested in #24574 and #25772.