aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2016-03-31 22:59:19 +0600
committerSergey M․ <dstftw@gmail.com>2016-03-31 22:59:19 +0600
commit6bb4600717cb5378d392845e5c9bebe236a1b224 (patch)
treedd56b1412d2936f113d9c55b7a6ced4b88867a91 /youtube_dl
parent41d06b042427aa019200bb80a1935d12110f50b1 (diff)
[udemy:course] Simplify course curriculum downloading
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/extractor/udemy.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/youtube_dl/extractor/udemy.py b/youtube_dl/extractor/udemy.py
index 2e54dbc11..1784599e9 100644
--- a/youtube_dl/extractor/udemy.py
+++ b/youtube_dl/extractor/udemy.py
@@ -322,17 +322,14 @@ class UdemyCourseIE(UdemyIE):
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,
- {
+ course_id, 'Downloading course curriculum', query={
'fields[chapter]': 'title,object_index',
'fields[lecture]': 'title',
'page_size': '1000',
})
- response = self._download_json(
- course_url, course_id, 'Downloading course curriculum')
-
entries = []
chapter, chapter_number = [None] * 2
for entry in response['results']: