From 5de538787df3f13476489b4a7dfae442c046fab7 Mon Sep 17 00:00:00 2001 From: Remita Amine Date: Fri, 19 Apr 2019 20:44:31 +0100 Subject: [PATCH] [udemy] add another course id extraction pattern(closes #20491) --- youtube_dl/extractor/udemy.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/youtube_dl/extractor/udemy.py b/youtube_dl/extractor/udemy.py index 66ea6fb151..2a4faecefb 100644 --- a/youtube_dl/extractor/udemy.py +++ b/youtube_dl/extractor/udemy.py @@ -76,7 +76,10 @@ def _extract_course_info(self, webpage, video_id): webpage, 'course', default='{}')), video_id, fatal=False) or {} course_id = course.get('id') or self._search_regex( - r'data-course-id=["\'](\d+)', webpage, 'course id') + [ + r'data-course-id=["\'](\d+)', + r'"courseId"\s*:\s*(\d+)' + ], webpage, 'course id') return course_id, course.get('title') def _enroll_course(self, base_url, webpage, course_id):