Gaarv / kadenze-dl

Small application to download Kadenze (https://www.kadenze.com) videos for courses you enrolled in
MIT License
50 stars 16 forks source link

course URLs are sometimes not what they seem #9

Closed gr4yscale closed 5 years ago

gr4yscale commented 5 years ago

This is more an issue with the kadenze site, but just to bring it to your attention, as you probably have a better understanding how these URLs are created and updated.

Trying to download this one: https://www.kadenze.com/courses/machine-learning-for-musicians-and-artists/info

machine-learning-for-musicians-and-artists does not work

The script works if you use the old name which appends -v

machine-learning-for-musicians-and-artists-v works

Any ideas how we can better "guess" what the actual value should be when updating the configuration.yml?

Related question:

Is there a better way to get debugging info, some kind of verbose flag? At the present if the script has issues (you aren't enrolled, or wrong URL / course title), it doesn't emit any output to indicate that it skipped that course.

Gaarv commented 5 years ago

Indeed, when opening in a browser https://www.kadenze.com/courses/machine-learning-for-musicians-and-artists/info there is no redirect, but https://www.kadenze.com/courses/machine-learning-for-musicians-and-artists is redirected to https://www.kadenze.com/courses/machine-learning-for-musicians-and-artists-v/info

I will check redirection parameters in the client. I should also recommend in the readme to use the "Dashboard" page (left menu panel) to get the correct URL, or trying to get that automatically if possible.

Good suggestion about possible issues, since it's not from an API but scraped I wanted to avoid the "one fail, all broken" effect and maybe went too far on error catching :) I will see what I can do on this.

Thanks for reporting this !

Gaarv commented 5 years ago

I changed the redirection parameter and you can now use the base link for the course to download it.

Also, in order to simplify this when you just want to download them all, you can now use "all" instead of course names.

gr4yscale commented 5 years ago

Thank you for this! :+1: Sorry I did not get a chance to test it for you, you were fast :)

The "all" directive seems like a great idea, thanks again!