mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-25 00:00:48 +01:00
[pluralsight] Extract chapter metadata (Closes #8993)
This commit is contained in:
parent
00322ad4fd
commit
8018028d0f
@ -279,13 +279,18 @@ def _real_extract(self, url):
|
|||||||
course_id, 'Downloading course data JSON')
|
course_id, 'Downloading course data JSON')
|
||||||
|
|
||||||
entries = []
|
entries = []
|
||||||
for module in course_data:
|
for num, module in enumerate(course_data, 1):
|
||||||
for clip in module.get('clips', []):
|
for clip in module.get('clips', []):
|
||||||
player_parameters = clip.get('playerParameters')
|
player_parameters = clip.get('playerParameters')
|
||||||
if not player_parameters:
|
if not player_parameters:
|
||||||
continue
|
continue
|
||||||
entries.append(self.url_result(
|
entries.append({
|
||||||
'%s/training/player?%s' % (self._API_BASE, player_parameters),
|
'_type': 'url_transparent',
|
||||||
'Pluralsight'))
|
'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)
|
return self.playlist_result(entries, course_id, title, description)
|
||||||
|
Loading…
Reference in New Issue
Block a user