Skip to content

Commit

Permalink
[teachable] Add support for multiple videos per lecture (closes #24101)
Browse files Browse the repository at this point in the history
  • Loading branch information
dstftw authored and bbepis committed Feb 27, 2020
1 parent b754059 commit 23605d9
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions youtube_dl/extractor/teachable.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ def _real_extract(self, url):

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',
Expand All @@ -174,12 +174,14 @@ def _real_extract(self, url):

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):
Expand Down

0 comments on commit 23605d9

Please sign in to comment.