aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2016-03-25 02:28:39 +0600
committerSergey M․ <dstftw@gmail.com>2016-03-25 02:28:39 +0600
commit5eb7db4ee96c97d98a87d8d7df46e8c6a607b682 (patch)
tree55633ec49aaf94bbc594da0d7179ea12f084378c
parentf0e83681d97db52af9dc73d1c8e51d671503a222 (diff)
downloadyoutube-dl-5eb7db4ee96c97d98a87d8d7df46e8c6a607b682.tar.xz
[udemy] Add support for new URL schema
-rw-r--r--youtube_dl/extractor/udemy.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/youtube_dl/extractor/udemy.py b/youtube_dl/extractor/udemy.py
index 2b886d6c8..a9046b865 100644
--- a/youtube_dl/extractor/udemy.py
+++ b/youtube_dl/extractor/udemy.py
@@ -18,7 +18,16 @@ from ..utils import (
class UdemyIE(InfoExtractor):
IE_NAME = 'udemy'
- _VALID_URL = r'https?://www\.udemy\.com/(?:[^#]+#/lecture/|lecture/view/?\?lectureId=)(?P<id>\d+)'
+ _VALID_URL = r'''(?x)
+ https?://
+ www\.udemy\.com/
+ (?:
+ [^#]+\#/lecture/|
+ lecture/view/?\?lectureId=|
+ [^/]+/learn/v4/t/lecture/
+ )
+ (?P<id>\d+)
+ '''
_LOGIN_URL = 'https://www.udemy.com/join/login-popup/?displayType=ajax&showSkipButton=1'
_ORIGIN_URL = 'https://www.udemy.com'
_NETRC_MACHINE = 'udemy'
@@ -34,6 +43,10 @@ class UdemyIE(InfoExtractor):
'duration': 579.29,
},
'skip': 'Requires udemy account credentials',
+ }, {
+ # new URL schema
+ 'url': 'https://www.udemy.com/electric-bass-right-from-the-start/learn/v4/t/lecture/4580906',
+ 'only_matching': True,
}]
def _enroll_course(self, base_url, webpage, course_id):