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

Videos with resolution of 1024x768 cannot be downloaded #18

Open
heinrich-ulbricht opened this issue Apr 12, 2020 · 4 comments
Open

Videos with resolution of 1024x768 cannot be downloaded #18

heinrich-ulbricht opened this issue Apr 12, 2020 · 4 comments
Labels
good first issue Beginner-friendly issues

Comments

@heinrich-ulbricht
Copy link

Observed behavior:
Currently the script is not able to download (older) videos that have a resolution of 1024x768. The error message is not helpful: "Something went wrong. Double check the URL and try logging in again."

Expected behavior:
Videos with a resolution of 1024x768 can be downloaded.

Analysis
The resolution of 1280x720 is hard-baked into the code here:

https://github.com/knyzorg/pluralsight-scraper/blob/8388d58bfdb760d55f50e60ed852fbe063546ea4/index.js#L21

Changing this manually to 1024x768 works. The solution would be to try the higher resolution first, then fall back to the lower one. This is exactly what the web player does (I checked).

@vezaynk
Copy link
Collaborator

vezaynk commented Apr 12, 2020

I kind of expected this error to arise, but couldn't find a place where it happened. Do you have any idea where we can retrieve the available resolution information?

@vezaynk vezaynk mentioned this issue Apr 12, 2020
5 tasks
@heinrich-ulbricht
Copy link
Author

heinrich-ulbricht commented Apr 12, 2020

I don't know where to get the available resolutions, but the web video player of Pluralsight does neither. It tries 1280x720 first (the 404 in the screenshot), then 1024x768:

image

So doing the same seems appropriate - with a proper delay between requests. Rate limiting seems to kick in fairly quickly.

@vezaynk
Copy link
Collaborator

vezaynk commented Apr 12, 2020

The resolutions seem hard-coded into the embedded player js file. Extracting it would be a pain.

The solution would be to try the higher resolution first, then fall back to the lower one.

This seems like the ideal solution. I unfortunately have a lot on my plate at the moment, but PRs are welcome!

@heinrich-ulbricht
Copy link
Author

Good find. Same here, and yes :D

@vezaynk vezaynk added the good first issue Beginner-friendly issues label Jun 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Beginner-friendly issues
Projects
None yet
Development

No branches or pull requests

2 participants