1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-02-04 12:53:13 +08:00

[pluralsight] do not extract videos if user doesn't have permission

This commit is contained in:
remitamine 2015-11-21 13:42:17 +01:00
parent 4137196899
commit acd96480fc

View File

@ -110,6 +110,10 @@ class PluralsightIE(InfoExtractor):
if clip_index is None:
continue
if compat_str(clip_index) == clip_id:
if module_.get('authorized') is False:
raise ExtractorError(
'%s said: Your current subscription level does not allow you to view this module.' % self.IE_NAME,
expected=True)
clip = clip_
break
@ -215,7 +219,7 @@ class PluralsightCourseIE(InfoExtractor):
for module in course_data:
for clip in module.get('clips', []):
player_parameters = clip.get('playerParameters')
if not player_parameters:
if not player_parameters or clip.get('userMayViewClip') is False:
continue
entries.append(self.url_result(
'http://www.pluralsight.com/training/player?%s' % player_parameters,