Scrap the 42 Intranet’s elearning videos in a single click.
Why you would want to use it ?
- Adjust speed at your convenience. (The intra doesn’t allow this)
- Working in a remote location where internet is hit or miss ? Download what you need and you’ll have it in your computer.
- Have a friend that is freeze and can’t access the intra’s resources ? You can download the videos, compress them and send them via drive.
How to use it:
git clone [email protected]:Dovalich/42intra_scraper.git
pip3 install -r requirements.txt
And then all you have to do is follow the instructions that the program gives you, that is:
- enter your 42 intranet username
- enter your 42 intranet password
- enter the elearning link you want to scrap for example https://elearning.intra.42.fr/tags/38/notions
Here’s a short Tutorial gif:
How does it work ?
It’s fairly simple.
The program makes a post request to the intranet using your logins (via the requests module).
Once logged-in, it recursively searches for any links that are in the middle of the page (the ones that contain videos).
Once it finds a video link, it downloads it based on the video quality you chose (SD or HD).
As you can see in the code I don’t store your user name and password. In fact I only use them once to login. But be careful when using these types of scripts. You should always read the source code before giving away sensitive information.
If you have feedback on the code please let me know! ??
And feel free to use it however you want.