forked from minhngoc25a/yt-dlc
[udemy:course] Simplify course curriculum downloading
This commit is contained in:
parent
41d06b0424
commit
6bb4600717
|
@ -322,17 +322,14 @@ class UdemyCourseIE(UdemyIE):
|
||||||
|
|
||||||
self._enroll_course(url, webpage, course_id)
|
self._enroll_course(url, webpage, course_id)
|
||||||
|
|
||||||
course_url = update_url_query(
|
response = self._download_json(
|
||||||
'https://www.udemy.com/api-2.0/courses/%s/cached-subscriber-curriculum-items' % course_id,
|
'https://www.udemy.com/api-2.0/courses/%s/cached-subscriber-curriculum-items' % course_id,
|
||||||
{
|
course_id, 'Downloading course curriculum', query={
|
||||||
'fields[chapter]': 'title,object_index',
|
'fields[chapter]': 'title,object_index',
|
||||||
'fields[lecture]': 'title',
|
'fields[lecture]': 'title',
|
||||||
'page_size': '1000',
|
'page_size': '1000',
|
||||||
})
|
})
|
||||||
|
|
||||||
response = self._download_json(
|
|
||||||
course_url, course_id, 'Downloading course curriculum')
|
|
||||||
|
|
||||||
entries = []
|
entries = []
|
||||||
chapter, chapter_number = [None] * 2
|
chapter, chapter_number = [None] * 2
|
||||||
for entry in response['results']:
|
for entry in response['results']:
|
||||||
|
|
Loading…
Reference in New Issue