[udemy:course] Use new URL format
authorSergey M․ <dstftw@gmail.com>
Thu, 31 Mar 2016 20:24:22 +0000 (02:24 +0600)
committerSergey M․ <dstftw@gmail.com>
Thu, 31 Mar 2016 20:24:22 +0000 (02:24 +0600)
youtube_dl/extractor/udemy.py

index e91cf44fec8b7c6fa3db176911c8446ffa6703a2..a788cdd7725af5705368bcc1d6c2db448419dd65 100644 (file)
@@ -305,7 +305,7 @@ class UdemyIE(InfoExtractor):
 
 class UdemyCourseIE(UdemyIE):
     IE_NAME = 'udemy:course'
-    _VALID_URL = r'https?://www\.udemy\.com/(?P<id>[\da-z-]+)'
+    _VALID_URL = r'https?://www\.udemy\.com/(?P<id>[^/?#&]+)'
     _TESTS = []
 
     @classmethod
@@ -338,7 +338,7 @@ class UdemyCourseIE(UdemyIE):
                 if lecture_id:
                     entry = {
                         '_type': 'url_transparent',
-                        'url': 'https://www.udemy.com/%s/#/lecture/%s' % (course_path, entry['id']),
+                        'url': 'https://www.udemy.com/%s/learn/v4/t/lecture/%s' % (course_path, entry['id']),
                         'title': entry.get('title'),
                         'ie_key': UdemyIE.ie_key(),
                     }