projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9abeefd
)
[udemy] add another course id extraction pattern(closes #20491)
author
Remita Amine
<remitamine@gmail.com>
Fri, 19 Apr 2019 19:44:31 +0000
(20:44 +0100)
committer
Remita Amine
<remitamine@gmail.com>
Fri, 19 Apr 2019 19:44:59 +0000
(20:44 +0100)
youtube_dl/extractor/udemy.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/udemy.py
b/youtube_dl/extractor/udemy.py
index 66ea6fb1516a406ec06cfd60525bd9e0c0987ef6..2a4faecefbc271f1f88dfe38d2fe284e0bbd9158 100644
(file)
--- 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):