logo

youtube-dl

[mirror] Download/Watch videos from video hosters
commit: 5de538787df3f13476489b4a7dfae442c046fab7
parent 9abeefd5275e4b468d4ba3a46446ae6cf8365171
Author: Remita Amine <remitamine@gmail.com>
Date:   Fri, 19 Apr 2019 20:44:31 +0100

[udemy] add another course id extraction pattern(closes #20491)

Diffstat:

Myoutube_dl/extractor/udemy.py5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/youtube_dl/extractor/udemy.py b/youtube_dl/extractor/udemy.py @@ -76,7 +76,10 @@ class UdemyIE(InfoExtractor): 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'&quot;courseId&quot;\s*:\s*(\d+)' + ], webpage, 'course id') return course_id, course.get('title') def _enroll_course(self, base_url, webpage, course_id):