diff options
author | Sergey M․ <dstftw@gmail.com> | 2016-01-01 20:34:29 +0600 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2016-01-01 20:34:29 +0600 |
commit | 5bafcf65255261c2dc6482de6b1e545e5de1cbee (patch) | |
tree | 4f43eda8c8521aea8e3d9a0af5defba851a24490 /youtube_dl/extractor/udemy.py | |
parent | 306c51c66922abb1846640b81c9b7c4d6a570d37 (diff) |
[udemy] Use chapter_number
Diffstat (limited to 'youtube_dl/extractor/udemy.py')
-rw-r--r-- | youtube_dl/extractor/udemy.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/youtube_dl/extractor/udemy.py b/youtube_dl/extractor/udemy.py index 41097829d..1df636779 100644 --- a/youtube_dl/extractor/udemy.py +++ b/youtube_dl/extractor/udemy.py @@ -245,7 +245,7 @@ class UdemyCourseIE(UdemyIE): course_id, 'Downloading course curriculum') entries = [] - chapter, chapter_id = None, None + chapter, chapter_number = None, None for asset in response: asset_type = asset.get('assetType') or asset.get('asset_type') if asset_type == 'Video': @@ -256,13 +256,13 @@ class UdemyCourseIE(UdemyIE): 'url': 'https://www.udemy.com/%s/#/lecture/%s' % (course_path, asset['id']), 'ie_key': UdemyIE.ie_key(), } - if chapter_id: - entry['chapter_id'] = chapter_id + if chapter_number: + entry['chapter_number'] = chapter_number if chapter: entry['chapter'] = chapter entries.append(entry) elif asset.get('type') == 'chapter': - chapter_id = asset.get('index') or asset.get('object_index') + chapter_number = asset.get('index') or asset.get('object_index') chapter = asset.get('title') return self.playlist_result(entries, course_id, course_title) |