diff options
author | Sergey M․ <dstftw@gmail.com> | 2020-02-23 06:49:45 +0700 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2020-02-23 06:49:45 +0700 |
commit | 00d798b7c25f0a03adb252c882df46abc8c23b1b (patch) | |
tree | f4153f30a5a0180dd55acb9dd6f8ba8db7796fca | |
parent | fda6d237a5b664cc8a9a45562d4113c51fd0280d (diff) |
[teachable] Add support for multiple videos per lecture (closes #24101)
-rw-r--r-- | youtube_dl/extractor/teachable.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/youtube_dl/extractor/teachable.py b/youtube_dl/extractor/teachable.py index 6b7f13b43..cca89a4a8 100644 --- a/youtube_dl/extractor/teachable.py +++ b/youtube_dl/extractor/teachable.py @@ -160,8 +160,8 @@ class TeachableIE(TeachableBaseIE): webpage = self._download_webpage(url, video_id) - wistia_url = WistiaIE._extract_url(webpage) - if not wistia_url: + wistia_urls = WistiaIE._extract_urls(webpage) + if not wistia_urls: if any(re.search(p, webpage) for p in ( r'class=["\']lecture-contents-locked', r'>\s*Lecture contents locked', @@ -174,12 +174,14 @@ class TeachableIE(TeachableBaseIE): title = self._og_search_title(webpage, default=None) - return { + entries = [{ '_type': 'url_transparent', 'url': wistia_url, 'ie_key': WistiaIE.ie_key(), 'title': title, - } + } for wistia_url in wistia_urls] + + return self.playlist_result(entries, video_id, title) class TeachableCourseIE(TeachableBaseIE): |