mirror of
https://github.com/l1ving/youtube-dl
synced 2025-02-04 10:33:01 +08:00
[pluralsight] do not extract videos if user doesn't have permission
This commit is contained in:
parent
4137196899
commit
acd96480fc
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user