diff options
author | Remita Amine <remitamine@gmail.com> | 2019-04-19 20:44:31 +0100 |
---|---|---|
committer | Remita Amine <remitamine@gmail.com> | 2019-04-19 20:44:59 +0100 |
commit | 5de538787df3f13476489b4a7dfae442c046fab7 (patch) | |
tree | c79a91c472f14381dbc63feb4e4bb9088c5fd975 /youtube_dl | |
parent | 9abeefd5275e4b468d4ba3a46446ae6cf8365171 (diff) | |
download | youtube-dl-5de538787df3f13476489b4a7dfae442c046fab7.tar.xz |
[udemy] add another course id extraction pattern(closes #20491)
Diffstat (limited to 'youtube_dl')
-rw-r--r-- | youtube_dl/extractor/udemy.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/youtube_dl/extractor/udemy.py b/youtube_dl/extractor/udemy.py index 66ea6fb15..2a4faecef 100644 --- 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'"courseId"\s*:\s*(\d+)' + ], webpage, 'course id') return course_id, course.get('title') def _enroll_course(self, base_url, webpage, course_id): |