mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-03 23:25:06 +00:00
[udemy] add another course id extraction pattern(closes #20491)
This commit is contained in:
parent
9abeefd527
commit
5de538787d
1 changed files with 4 additions and 1 deletions
|
@ -76,7 +76,10 @@ def _extract_course_info(self, webpage, video_id):
|
||||||
webpage, 'course', default='{}')),
|
webpage, 'course', default='{}')),
|
||||||
video_id, fatal=False) or {}
|
video_id, fatal=False) or {}
|
||||||
course_id = course.get('id') or self._search_regex(
|
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')
|
return course_id, course.get('title')
|
||||||
|
|
||||||
def _enroll_course(self, base_url, webpage, course_id):
|
def _enroll_course(self, base_url, webpage, course_id):
|
||||||
|
|
Loading…
Reference in a new issue