diff options
author | Sergey M․ <dstftw@gmail.com> | 2020-06-06 02:14:35 +0700 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2020-06-06 02:14:35 +0700 |
commit | 562de77f41d0c08df9dbb08cfa86ba6c7d239c5a (patch) | |
tree | 42c89944b847cc028c55656605577bb49e56e734 /youtube_dl/extractor/generic.py | |
parent | e1723c4bac4e465991789b5a29beb946d872f508 (diff) |
[kaltura] Add support for multiple embeds on a webpage (closes #25523)
Diffstat (limited to 'youtube_dl/extractor/generic.py')
-rw-r--r-- | youtube_dl/extractor/generic.py | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/youtube_dl/extractor/generic.py b/youtube_dl/extractor/generic.py index ce8252f6a..355067a50 100644 --- a/youtube_dl/extractor/generic.py +++ b/youtube_dl/extractor/generic.py @@ -1709,6 +1709,15 @@ class GenericIE(InfoExtractor): 'add_ie': ['Kaltura'], }, { + # multiple kaltura embeds, nsfw + 'url': 'https://www.quartier-rouge.be/prive/femmes/kamila-avec-video-jaime-sadomie.html', + 'info_dict': { + 'id': 'kamila-avec-video-jaime-sadomie', + 'title': "Kamila avec vídeo “J'aime sadomie”", + }, + 'playlist_count': 8, + }, + { # Non-standard Vimeo embed 'url': 'https://openclassrooms.com/courses/understanding-the-web', 'md5': '64d86f1c7d369afd9a78b38cbb88d80a', @@ -2844,9 +2853,12 @@ class GenericIE(InfoExtractor): return self.url_result(mobj.group('url'), 'Zapiks') # Look for Kaltura embeds - kaltura_url = KalturaIE._extract_url(webpage) - if kaltura_url: - return self.url_result(smuggle_url(kaltura_url, {'source_url': url}), KalturaIE.ie_key()) + kaltura_urls = KalturaIE._extract_urls(webpage) + if kaltura_urls: + return self.playlist_from_matches( + kaltura_urls, video_id, video_title, + getter=lambda x: smuggle_url(x, {'source_url': url}), + ie=KalturaIE.ie_key()) # Look for EaglePlatform embeds eagleplatform_url = EaglePlatformIE._extract_url(webpage) |