diff options
Diffstat (limited to 'yt_dlp/extractor/teachable.py')
-rw-r--r-- | yt_dlp/extractor/teachable.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/yt_dlp/extractor/teachable.py b/yt_dlp/extractor/teachable.py index e480d7610..c212a4926 100644 --- a/yt_dlp/extractor/teachable.py +++ b/yt_dlp/extractor/teachable.py @@ -140,12 +140,12 @@ class TeachableIE(TeachableBaseIE): r'<link[^>]+href=["\']https?://(?:process\.fs|assets)\.teachablecdn\.com', webpage) - @staticmethod - def _extract_url(webpage, source_url): - if not TeachableIE._is_teachable(webpage): - return - if re.match(r'https?://[^/]+/(?:courses|p)', source_url): - return '%s%s' % (TeachableBaseIE._URL_PREFIX, source_url) + @classmethod + def _extract_embed_urls(cls, url, webpage): + if cls._is_teachable(webpage): + if re.match(r'https?://[^/]+/(?:courses|p)', url): + yield f'{cls._URL_PREFIX}{url}' + raise cls.StopExtraction() def _real_extract(self, url): mobj = self._match_valid_url(url) @@ -160,7 +160,7 @@ class TeachableIE(TeachableBaseIE): webpage = self._download_webpage(url, video_id) - wistia_urls = WistiaIE._extract_urls(webpage) + wistia_urls = WistiaIE._extract_embed_urls(url, webpage) if not wistia_urls: if any(re.search(p, webpage) for p in ( r'class=["\']lecture-contents-locked', |