diff --git a/youtube_dl/extractor/udemy.py b/youtube_dl/extractor/udemy.py index 0fd2a0a0a5..74cc36ece2 100644 --- a/youtube_dl/extractor/udemy.py +++ b/youtube_dl/extractor/udemy.py @@ -144,7 +144,7 @@ class UdemyIE(InfoExtractor): webpage = self._download_webpage(url, lecture_id) course_id = self._search_regex( - (r'data-course-id=["\'](\d+)', r'"id": (\d+)'), + (r'data-course-id=["\'](\d+)', r'"id"\s*:\s*(\d+)'), webpage, 'course id') try: