mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-27 10:52:34 +00:00
[teachable] Add support for multiple videos per lecture (closes #24101)
This commit is contained in:
parent
fda6d237a5
commit
00d798b7c2
@ -160,8 +160,8 @@ def _real_extract(self, url):
|
|||||||
|
|
||||||
webpage = self._download_webpage(url, video_id)
|
webpage = self._download_webpage(url, video_id)
|
||||||
|
|
||||||
wistia_url = WistiaIE._extract_url(webpage)
|
wistia_urls = WistiaIE._extract_urls(webpage)
|
||||||
if not wistia_url:
|
if not wistia_urls:
|
||||||
if any(re.search(p, webpage) for p in (
|
if any(re.search(p, webpage) for p in (
|
||||||
r'class=["\']lecture-contents-locked',
|
r'class=["\']lecture-contents-locked',
|
||||||
r'>\s*Lecture contents locked',
|
r'>\s*Lecture contents locked',
|
||||||
@ -174,12 +174,14 @@ def _real_extract(self, url):
|
|||||||
|
|
||||||
title = self._og_search_title(webpage, default=None)
|
title = self._og_search_title(webpage, default=None)
|
||||||
|
|
||||||
return {
|
entries = [{
|
||||||
'_type': 'url_transparent',
|
'_type': 'url_transparent',
|
||||||
'url': wistia_url,
|
'url': wistia_url,
|
||||||
'ie_key': WistiaIE.ie_key(),
|
'ie_key': WistiaIE.ie_key(),
|
||||||
'title': title,
|
'title': title,
|
||||||
}
|
} for wistia_url in wistia_urls]
|
||||||
|
|
||||||
|
return self.playlist_result(entries, video_id, title)
|
||||||
|
|
||||||
|
|
||||||
class TeachableCourseIE(TeachableBaseIE):
|
class TeachableCourseIE(TeachableBaseIE):
|
||||||
|
Loading…
Reference in New Issue
Block a user