diff options
author | Jesús <heckyel@hyperbola.info> | 2021-06-18 14:30:07 -0500 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2021-06-18 14:30:07 -0500 |
commit | 8bee8b2e4f2ffb4d3d9f87cc7d6452e94f814004 (patch) | |
tree | f1e92751ef2064328d6ae88c13cfdde9f69964de | |
parent | 6ad04ca4b6e0e4a7be722f49cb8a6faed35aed67 (diff) | |
parent | a7f61feab2dbfc50a7ebe8b0ea390bd0e5edf77a (diff) | |
download | hypervideo-pre-8bee8b2e4f2ffb4d3d9f87cc7d6452e94f814004.tar.lz hypervideo-pre-8bee8b2e4f2ffb4d3d9f87cc7d6452e94f814004.tar.xz hypervideo-pre-8bee8b2e4f2ffb4d3d9f87cc7d6452e94f814004.zip |
updated from upstream | 18/06/2021 at 14:30
-rw-r--r-- | youtube_dl/extractor/egghead.py | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/youtube_dl/extractor/egghead.py b/youtube_dl/extractor/egghead.py index aff9b88c0..9bbd703e0 100644 --- a/youtube_dl/extractor/egghead.py +++ b/youtube_dl/extractor/egghead.py @@ -22,16 +22,19 @@ class EggheadBaseIE(InfoExtractor): class EggheadCourseIE(EggheadBaseIE): IE_DESC = 'egghead.io course' IE_NAME = 'egghead:course' - _VALID_URL = r'https://egghead\.io/courses/(?P<id>[^/?#&]+)' - _TEST = { + _VALID_URL = r'https://(?:app\.)?egghead\.io/(?:course|playlist)s/(?P<id>[^/?#&]+)' + _TESTS = [{ 'url': 'https://egghead.io/courses/professor-frisby-introduces-composable-functional-javascript', 'playlist_count': 29, 'info_dict': { - 'id': '72', + 'id': '432655', 'title': 'Professor Frisby Introduces Composable Functional JavaScript', 'description': 're:(?s)^This course teaches the ubiquitous.*You\'ll start composing functionality before you know it.$', }, - } + }, { + 'url': 'https://app.egghead.io/playlists/professor-frisby-introduces-composable-functional-javascript', + 'only_matching': True, + }] def _real_extract(self, url): playlist_id = self._match_id(url) @@ -65,7 +68,7 @@ class EggheadCourseIE(EggheadBaseIE): class EggheadLessonIE(EggheadBaseIE): IE_DESC = 'egghead.io lesson' IE_NAME = 'egghead:lesson' - _VALID_URL = r'https://egghead\.io/(?:api/v1/)?lessons/(?P<id>[^/?#&]+)' + _VALID_URL = r'https://(?:app\.)?egghead\.io/(?:api/v1/)?lessons/(?P<id>[^/?#&]+)' _TESTS = [{ 'url': 'https://egghead.io/lessons/javascript-linear-data-flow-with-container-style-types-box', 'info_dict': { @@ -88,6 +91,9 @@ class EggheadLessonIE(EggheadBaseIE): }, { 'url': 'https://egghead.io/api/v1/lessons/react-add-redux-to-a-react-application', 'only_matching': True, + }, { + 'url': 'https://app.egghead.io/lessons/javascript-linear-data-flow-with-container-style-types-box', + 'only_matching': True, }] def _real_extract(self, url): |