aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/frontendmasters.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2018-07-21 19:08:28 +0700
committerSergey M․ <dstftw@gmail.com>2018-07-21 19:08:28 +0700
commit3052a30d4259b182904e5d2430077039461745bb (patch)
tree90ff37fa326c33aff3ad82cd40a2f3ce856ee65b /youtube_dl/extractor/frontendmasters.py
parent4ecf300d13a6503ae80b76e01047b41d86ab4d92 (diff)
downloadyoutube-dl-3052a30d4259b182904e5d2430077039461745bb.tar.xz
Improve URL extraction
Diffstat (limited to 'youtube_dl/extractor/frontendmasters.py')
-rw-r--r--youtube_dl/extractor/frontendmasters.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/youtube_dl/extractor/frontendmasters.py b/youtube_dl/extractor/frontendmasters.py
index 770db46d0..cb57ba007 100644
--- a/youtube_dl/extractor/frontendmasters.py
+++ b/youtube_dl/extractor/frontendmasters.py
@@ -11,6 +11,7 @@ from ..compat import (
from ..utils import (
ExtractorError,
parse_duration,
+ url_or_none,
urlencode_postdata,
)
@@ -80,7 +81,7 @@ class FrontendMastersPageBaseIE(FrontendMastersBaseIE):
chapters = []
lesson_elements = course.get('lessonElements')
if isinstance(lesson_elements, list):
- chapters = [e for e in lesson_elements if isinstance(e, compat_str)]
+ chapters = [url_or_none(e) for e in lesson_elements if url_or_none(e)]
return chapters
@staticmethod