Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download Pluralsight Subtitles #24917

Closed
ATHellboy opened this issue Apr 21, 2020 · 16 comments
Closed

Download Pluralsight Subtitles #24917

ATHellboy opened this issue Apr 21, 2020 · 16 comments

Comments

@ATHellboy
Copy link

@ATHellboy ATHellboy commented Apr 21, 2020

Checklist

  • I'm asking a question
  • I've looked through the README and FAQ for similar questions
  • I've searched the bugtracker for similar questions including closed ones

Question

I use this command for downloading course subtitles in Pluralsight:

youtube-dl --username USERNAME --password PASSWORD --all-subs URL --skip-download

But I receive this :

[pluralsight:course] unity-shader-graph-introduction: Downloading JSON metadata
[download] Downloading playlist: Introduction to Shader Graph in Unity
[pluralsight:course] playlist Introduction to Shader Graph in Unity: Collected 19 video ids (downloading 19 of them)
[download] Downloading video 1 of 19
[pluralsight] Downloading login page
ERROR: Unable to download webpage: HTTP Error 403: Forbidden (caused by HTTPError()); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

But when I use this command, I can download videos:

youtube-dl --username USERNAME --password PASSWORD URL

What should I do to fix this problem ?

@ATHellboy ATHellboy added the question label Apr 21, 2020
@jaimebl
Copy link

@jaimebl jaimebl commented Apr 21, 2020

which python version you're using? We've been identified that issue happening with some particular python versions. Try using version 3.7 or 3.8.

Also -all-subs feature is not available on pluralsight yet, it's just downloading english subtitles.
I've opened a Pull Request for that but it hasn't been merged yet #24832

@ATHellboy
Copy link
Author

@ATHellboy ATHellboy commented Apr 21, 2020

@jaimebl It was 3.6.4 I just upgraded it to 3.8.2 but still the same problem.

What should I use instead of --all-subs ?

@jaimebl
Copy link

@jaimebl jaimebl commented Apr 21, 2020

@ATHellboy With python 3.8.2 you shouldn't get that 403 error message(just tried myself same version), double check you're using that version in the logs and also that your account is not banned by logging in manually with the browser.

There's no way to get all subs currently, you can check out my pull request here if you want to try it #24832
However I wouldn't use --all-subs as it is now because you'll get Too many requests error message eventually and get banned, I'd better use --write-sub --sub-lang en,es instead and list the languages that you want to get

@ATHellboy
Copy link
Author

@ATHellboy ATHellboy commented Apr 21, 2020

@jaimebl I think you are right about the Python version which it uses.

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['https://app.pluralsight.com/library/courses/unity-shader-graph-introduction/table-of-contents', '-u', 'PRIVATE', '-p', 'PRIVATE', '--write-sub', '--sub-lang', 'en,es', '--verbose']
[debug] Encodings: locale cp65001, fs mbcs, out cp65001, pref cp65001
[debug] youtube-dl version 2020.03.24
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.18362
[debug] exe versions: none
[debug] Proxy map: {}
[pluralsight:course] unity-shader-graph-introduction: Downloading JSON metadata
[download] Downloading playlist: Introduction to Shader Graph in Unity
[pluralsight:course] playlist Introduction to Shader Graph in Unity: Collected 19 video ids (downloading 19 of them)
[download] Downloading video 1 of 19
[pluralsight] Downloading login page
ERROR: Unable to download webpage: HTTP Error 403: Forbidden (caused by HTTPError()); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpjwbwqymm\build\youtube_dl\extractor\common.py", line 627, in _request_webpage
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpjwbwqymm\build\youtube_dl\YoutubeDL.py", line 2238, in urlopen
  File "C:\Python\Python34\lib\urllib\request.py", line 470, in open
  File "C:\Python\Python34\lib\urllib\request.py", line 580, in http_response
  File "C:\Python\Python34\lib\urllib\request.py", line 508, in error
  File "C:\Python\Python34\lib\urllib\request.py", line 442, in _call_chain
  File "C:\Python\Python34\lib\urllib\request.py", line 588, in http_error_default

How can I change it ? Although I don't know why the version is 3.4.4. (I use youtube-dl on Windows if it helps)

@jaimebl
Copy link

@jaimebl jaimebl commented Apr 21, 2020

@ATHellboy I think for now, the easiest way to get it working is grabbing the cookies as I mention in this other comment:

#24895 (comment)

@ATHellboy
Copy link
Author

@ATHellboy ATHellboy commented Apr 21, 2020

@jaimebl I just exported cookies by EditThisCookie from https://app.pluralsight.com/library/ which you mentioned in that comment and put it into text file and put it in the folder which I execute youtube-dl there.

Then using this commend :

youtube-dl --cookies cookies.txt https://app.pluralsight.com/library/courses/unity-shader-graph-introduction/table-of-contents --write-sub --sub-lang en,es

But still there is an error:

Traceback (most recent call last):
  File "__main__.py", line 19, in <module>
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpjwbwqymm\build\youtube_dl\__init__.py", line 474, in main
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpjwbwqymm\build\youtube_dl\__init__.py", line 441, in _real_main
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpjwbwqymm\build\youtube_dl\YoutubeDL.py", line 419, in __init__
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpjwbwqymm\build\youtube_dl\YoutubeDL.py", line 2329, in _setup_opener
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpjwbwqymm\build\youtube_dl\utils.py", line 2762, in load
  File "C:\Python\Python34\lib\http\cookiejar.py", line 2005, in _really_load
http.cookiejar.LoadError: 'cookies.txt' does not look like a Netscape format cookies file

What do I do wrong ?
It is because of this ? => 'cookies.txt' does not look like a Netscape format cookies file.

@jhondbv
Copy link

@jhondbv jhondbv commented Apr 21, 2020

@ATHellboy try to do this #24895 (comment) , i had the same problem , if you see in your track you still use Phyton 3.4 with youtube-dl even you already installed Phyton 3.8

(your track )
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['https://app.pluralsight.com/library/courses/unity-shader-graph-introduction/table-of-contents', '-u', 'PRIVATE', '-p', 'PRIVATE', '--write-sub', '--sub-lang', 'en,es', '--verbose']
[debug] Encodings: locale cp65001, fs mbcs, out cp65001, pref cp65001
[debug] youtube-dl version 2020.03.24
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.18362

@jaimebl
Copy link

@jaimebl jaimebl commented Apr 21, 2020

@ATHellboy Ah god, yes you have to manually edit one line of those cookies, look for _sdsat_Target in your cookies file and add this after Subscription info: (Notice there's a tab at the beginning of the following snippet)

	InTerm:true|FullLibrary:true|Free:true|Trial:false|UserType:individual

So it will look something like this

app.pluralsight.com	FALSE	/	FALSE	1650564064	_sdsat_Target Subscription Info	InTerm:true|FullLibrary:true|Free:true|Trial:false|UserType:individual
@ATHellboy
Copy link
Author

@ATHellboy ATHellboy commented Apr 21, 2020

@jhondbv Thanks. It really helps. It works but just for the first time, I interrupted it then try it again and still get that 403 error.

@jaimebl Thanks, it works.

@ATHellboy
Copy link
Author

@ATHellboy ATHellboy commented Apr 21, 2020

UPDATE: I got this error because my cookies was wrong and actually it doesn't use it. (No authentication)
I used JSON cookie although I shall export cookies in Netscape format.

@jaimebl I get this error, what the hell:

[download] Downloading video 2 of 19
[pluralsight] 4dd0c174-ed1c-4968-b05f-72e01d1b5ed4-0: Downloading JSON metadata
[pluralsight] 4dd0c174-ed1c-4968-b05f-72e01d1b5ed4-0: Downloading mp4-high-widescreen viewclip graphql
[pluralsight] 4dd0c174-ed1c-4968-b05f-72e01d1b5ed4-0: Downloading mp4-high-widescreen viewclip JSON
WARNING: Unable to download JSON metadata: HTTP Error 403: Forbidden
[pluralsight] 4dd0c174-ed1c-4968-b05f-72e01d1b5ed4-0: Waiting for 2 seconds to avoid throttling
ERROR: No video formats found; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

Although I downloaded all this course videos before.

@jaimebl
Copy link

@jaimebl jaimebl commented Apr 21, 2020

@ATHellboy 😄 can you paste your full log?

@ATHellboy
Copy link
Author

@ATHellboy ATHellboy commented Apr 21, 2020

~~@jaimebl ~~

C:\Program Files (x86)\VideoDownloader>youtube-dl --cookies cookies.txt https://app.pluralsight.com/library/courses/unity-shader-graph-introduction/table-of-contents --write-sub --sub-lang en,es --verbose
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--cookies', 'cookies.txt', 'https://app.pluralsight.com/library/courses/unity-shader-graph-introduction/table-of-contents', '--write-sub', '--sub-lang', 'en,es', '--verbose']
[debug] Encodings: locale cp65001, fs mbcs, out cp65001, pref cp65001
[debug] youtube-dl version 2020.03.24
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.18362
[debug] exe versions: ffmpeg git-2020-04-20-cacdac8, ffprobe git-2020-04-20-cacdac8
[debug] Proxy map: {}
[pluralsight:course] unity-shader-graph-introduction: Downloading JSON metadata
[download] Downloading playlist: Introduction to Shader Graph in Unity
[pluralsight:course] playlist Introduction to Shader Graph in Unity: Collected 19 video ids (downloading 19 of them)
[download] Downloading video 1 of 19
[pluralsight] de51c857-ca7d-49fa-8c14-4846faaee0b1-0: Downloading JSON metadata
[pluralsight] de51c857-ca7d-49fa-8c14-4846faaee0b1-0: Downloading mp4-high-widescreen viewclip graphql
[pluralsight] de51c857-ca7d-49fa-8c14-4846faaee0b1-0: Downloading mp4-high-widescreen viewclip JSON
[pluralsight] de51c857-ca7d-49fa-8c14-4846faaee0b1-0: Waiting for 5 seconds to avoid throttling
[pluralsight] de51c857-ca7d-49fa-8c14-4846faaee0b1-0: Downloading captions JSON
WARNING: es subtitles not available for 043bd1cb-098d-4e32-a0f8-fdafd5e66eee
[debug] Default format spec: bestvideo+bestaudio/best
[info] Writing video subtitles to: Course Overview-043bd1cb-098d-4e32-a0f8-fdafd5e66eee.en.srt
[debug] Invoking downloader on 'https://vid5.pluralsight.com/expiretime=1587501698/8ed1ace3eac626a8fc918b84b64b0c83/clips/resolution/043bd1cb-098d-4e32-a0f8-fdafd5e66eee/current/mp4/1280x720.mp4'
[download] Course Overview-043bd1cb-098d-4e32-a0f8-fdafd5e66eee.mp4 has already been downloaded
[download] 100% of 3.95MiB
[download] Downloading video 2 of 19
[pluralsight] 4dd0c174-ed1c-4968-b05f-72e01d1b5ed4-0: Downloading JSON metadata
[pluralsight] 4dd0c174-ed1c-4968-b05f-72e01d1b5ed4-0: Downloading mp4-high-widescreen viewclip graphql
[pluralsight] 4dd0c174-ed1c-4968-b05f-72e01d1b5ed4-0: Downloading mp4-high-widescreen viewclip JSON
WARNING: Unable to download JSON metadata: HTTP Error 403: Forbidden
[pluralsight] 4dd0c174-ed1c-4968-b05f-72e01d1b5ed4-0: Waiting for 2 seconds to avoid throttling
ERROR: No video formats found; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpjwbwqymm\build\youtube_dl\YoutubeDL.py", line 797, in extract_info
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpjwbwqymm\build\youtube_dl\extractor\common.py", line 530, in extract
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpjwbwqymm\build\youtube_dl\extractor\pluralsight.py", line 421, in _real_extract
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpjwbwqymm\build\youtube_dl\extractor\common.py", line 1327, in _sort_formats
youtube_dl.utils.ExtractorError: No video formats found; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

@jaimebl
Copy link

@jaimebl jaimebl commented Apr 21, 2020

@ATHellboy Are you able to get to the website with your browser?

@ATHellboy
Copy link
Author

@ATHellboy ATHellboy commented Apr 21, 2020

@jaimebl Yup

@jhondbv
Copy link

@jhondbv jhondbv commented Apr 21, 2020

@ATHellboy try adding this argument on your youtube-dl command

-f "best[height<=720]/worst[height>720]"

something like : >youtube-dl --cookies cookies.txt --write-sub --sub-lang en,es --verbose -f "best[height<=720]/worst[height>720]" https://app.pluralsight.com/library/courses/unity-shader-graph-introduction

Although I think the problem is the authentication , you must to pass the credentials , try upgrade phyton version and pass your credentials in the command ,

@jaimebl
Copy link

@jaimebl jaimebl commented Apr 21, 2020

@ATHellboy You're probably having some issue with your authentication(as @jhondbv mentioned), if you try without the cookies parameter I bet you will get the same log response.

youtube-dl https://app.pluralsight.com/library/courses/unity-shader-graph-introduction/table-of-contents --write-sub --sub-lang en,es --verbose

Try setting your cookies again 🤔

@dstftw dstftw closed this Apr 22, 2020
@dstftw dstftw added the duplicate label Apr 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.