]> jfr.im git - yt-dlp.git/blobdiff - youtube_dl/extractor/udemy.py
Merge remote-tracking branch 'duncankl/airmozilla'
[yt-dlp.git] / youtube_dl / extractor / udemy.py
index 0e4d386a8ba32387f6f9025e633efb4c1ee59700..4667ed83b71f4aec5f081741834e2c9cca010e82 100644 (file)
@@ -3,9 +3,11 @@
 import re
 
 from .common import InfoExtractor
-from ..utils import (
+from ..compat import (
     compat_urllib_parse,
     compat_urllib_request,
+)
+from ..utils import (
     ExtractorError,
 )
 
@@ -97,11 +99,8 @@ def _login(self):
         if 'returnUrl' not in response:
             raise ExtractorError('Unable to log in')
 
-
-
     def _real_extract(self, url):
-        mobj = re.match(self._VALID_URL, url)
-        lecture_id = mobj.group('id')
+        lecture_id = self._match_id(url)
 
         lecture = self._download_json(
             'https://www.udemy.com/api-1.1/lectures/%s' % lecture_id,