summary refs log tree commit diff
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2016-03-27 02:10:52 +0600
committerSergey M․ <dstftw@gmail.com>2016-03-27 02:10:52 +0600
commit8018028d0fabb00c32b19b04984c482c6b54d2fb (patch)
treeb37220d20cc2034f3c2477db00969d6bc53251cc
parent00322ad4fda31864f249bce410ac3ba520e865ed (diff)
downloadyoutube-dl-8018028d0fabb00c32b19b04984c482c6b54d2fb.tar.gz
youtube-dl-8018028d0fabb00c32b19b04984c482c6b54d2fb.tar.xz
youtube-dl-8018028d0fabb00c32b19b04984c482c6b54d2fb.zip
[pluralsight] Extract chapter metadata (Closes #8993)
-rw-r--r--youtube_dl/extractor/pluralsight.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/youtube_dl/extractor/pluralsight.py b/youtube_dl/extractor/pluralsight.py
index bc66f7a9d..df03dd419 100644
--- a/youtube_dl/extractor/pluralsight.py
+++ b/youtube_dl/extractor/pluralsight.py
@@ -279,13 +279,18 @@ class PluralsightCourseIE(PluralsightBaseIE):
             course_id, 'Downloading course data JSON')
 
         entries = []
-        for module in course_data:
+        for num, module in enumerate(course_data, 1):
             for clip in module.get('clips', []):
                 player_parameters = clip.get('playerParameters')
                 if not player_parameters:
                     continue
-                entries.append(self.url_result(
-                    '%s/training/player?%s' % (self._API_BASE, player_parameters),
-                    'Pluralsight'))
+                entries.append({
+                    '_type': 'url_transparent',
+                    'url': '%s/training/player?%s' % (self._API_BASE, player_parameters),
+                    'ie_key': PluralsightIE.ie_key(),
+                    'chapter': module.get('title'),
+                    'chapter_number': num,
+                    'chapter_id': module.get('moduleRef'),
+                })
 
         return self.playlist_result(entries, course_id, title, description)