vendredi 5 juillet 2019

How can I download all of my lecture files using a bash script even though they're on different URLs and password protected?

I'm trying to avoid the hassle of spending weeks scrubbing all of my University files from the Canvas website and was trying to automate the process using a bash script (or anything else really, I'm happy to try anything). The problem I'm encountering is that I can't seem to bypass the password protection since I need to:

  • log in to canvas

  • follow a link that directs me to a separate password protected domain (for which my normal user/pass doesn't work) which aggregates all of the lecture links

  • click each of the links that lead to Paella Media players

  • get the .mp4 (or similar) file from the player.

I have managed to log in to the canvas form and get the web info from that but it looks like it's blocked by another protection (maybe SAML?) that generates a string of random values, granting access

the main commands I've been told to look at are:

$ wget <URL>

which only ever seems to get redirected to the login page and return nothing useful and

$ curl --cookie cjar --cookie-jar cjar --data '<Form Details>' <URL>

This would manage to log in to the first form but would only ever return the SAML protection page which I'm not sure what I can do with.

Thanks for your help, any insight is appreciated as I've hit a bit of a dead end with this project.




Aucun commentaire:

Enregistrer un commentaire