From c20b0e4fa7b73add166ed8b3ec371774e770447a Mon Sep 17 00:00:00 2001 From: ilpersi Date: Sun, 18 Oct 2020 10:53:54 +0200 Subject: [PATCH 1/2] Fix teachable course download --- youtube_dl/extractor/teachable.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/youtube_dl/extractor/teachable.py b/youtube_dl/extractor/teachable.py index a75369dbe..5a2df1ce6 100644 --- a/youtube_dl/extractor/teachable.py +++ b/youtube_dl/extractor/teachable.py @@ -139,9 +139,9 @@ class TeachableIE(TeachableBaseIE): @staticmethod def _is_teachable(webpage): - return 'teachableTracker.linker:autoLink' in webpage and re.search( - r']+href=["\']https?://process\.fs\.teachablecdn\.com', - webpage) + return 'teachableTracker.linker:autoLink' in webpage and ( + re.search(r']+href=["\']https?://process\.fs\.teachablecdn\.com', webpage) or + re.search(r']+src=["\']https?://process\.fs\.teachablecdn\.com', webpage)) @staticmethod def _extract_url(webpage, source_url): From 5c0e66320de8377df522aa6c04fecf028c1e00b7 Mon Sep 17 00:00:00 2001 From: ilpersi Date: Sun, 18 Oct 2020 19:30:14 +0200 Subject: [PATCH 2/2] Fix flake8 --- youtube_dl/extractor/teachable.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/youtube_dl/extractor/teachable.py b/youtube_dl/extractor/teachable.py index 5a2df1ce6..375b37ca5 100644 --- a/youtube_dl/extractor/teachable.py +++ b/youtube_dl/extractor/teachable.py @@ -140,8 +140,12 @@ class TeachableIE(TeachableBaseIE): @staticmethod def _is_teachable(webpage): return 'teachableTracker.linker:autoLink' in webpage and ( - re.search(r']+href=["\']https?://process\.fs\.teachablecdn\.com', webpage) or - re.search(r']+src=["\']https?://process\.fs\.teachablecdn\.com', webpage)) + re.search( + r']+href=["\']https?://process\.fs\.teachablecdn\.com', + webpage) + or re.search( + r']+src=["\']https?://process\.fs\.teachablecdn\.com', + webpage)) @staticmethod def _extract_url(webpage, source_url):