Open nisamo opened 2 years ago
Duplicate of #30765, except Py3 instead of Py2.
If you had reported this using the Broken site support template, you would have been prompted to check existing issues.
no solve this problem?
The original report was made a few days ago, but no Pluralsight user has been able to work on debugging the problem yet.
Generally, commercial courseware sites are difficult to support because they change the content structure in ways that only account holders can identify and are prone to deploy specific measures against tools like yt-dl.
Hi, any resolution on the issue?
Also running into this issue. I've clicked through a long chain of responses mentioning that issues are duplicates but no proposed fix. Any ideas?
Comment https://github.com/ytdl-org/youtube-dl/issues/30818#issuecomment-1087836864 still applies. If any progress is being made issue #30765 will be updated. See also https://github.com/yt-dlp/yt-dlp/issues/4570.
@dirkf I am attempting to look into this but can't seem to write the JSON it's failing to parse?
I've tried --write-pages --dump-pages --dump-json - am I barking up the wrong tree?
--print-traffic
will show the protocol exchanges between yt-dl and the webserver.
--write-pages
will write a copy of each page fetched from the webserver.
You can cross-check these with what you see in your browser's development tools.
In OP's log what's happening is that the primary API is failing and the fallback raises the exception (youtube_dl/extractor/pluralsight.py:85 ff.). This would give better diagnostics:
def _download_course(self, course_id, url, display_id):
try:
return self._download_course_rpc(course_id, url, display_id)
- except ExtractorError:
+ except ExtractorError as e:
# Old API fallback
- return self._download_json(
- 'https://app.pluralsight.com/player/user/api/v1/player/payload',
- display_id, data=urlencode_postdata({'courseId': course_id}),
- headers={'Referer': url})
+ try:
+ return self._download_json(
+ 'https://app.pluralsight.com/player/user/api/v1/player/payload',
+ display_id, data=urlencode_postdata({'courseId': course_id}),
+ headers={'Referer': url})
+ except ExtractorError as still_e:
+ self.report_warning('Fallback course API failed: ' + error_to_compat_str(still_e))
+ raise e
For detailed investigation, check out the code and stick
import pdb; pdb.set_trace()
ahead of the first try:
to get it to break there. Run the code using python -m youtube_dl ...
, from the directory that contains the checked-out code (eg, contains the youtube_dl
directory), instead of youtube-dl ...
.
@dirkf I am attempting to look into this but can't seem to write the JSON it's failing to parse?
I've tried --write-pages --dump-pages --dump-json - am I barking up the wrong tree?
Did you get any further with this?
It's because the backup no longer returns JSON, just a simple "OK". The rpc one gives a 403 forbidden no matter what.
youtube-dl --cookies cookies.txt --verbose --sleep-interval 600 https://app.pluralsight.com/library/courses/django-angularjs-web-development/table-of-contents
i get error: