8e10323ac3664a1ddb6d9393a9651c7cfb9a44ac
MoodleScraper
A simple tool to download as many files from moodle as possible. This was designed for me to easily build an archive of my courses at EPFL. It is still in development and was not built for other moodles. If used and if you don't mind, please send me the result at edouard.dufour@micro-ondes.ch for my personal archive.
Requirements
This script was written in python 3.10.4 and the following packages:
| package | version |
|---|---|
| beautifulsoup4 | 4.12.2 |
| requests | 2.31.0 |
Features
Currently downloads:
- ressources
- folders
- assignments
Usage
The script is pretty simple to use. Just provide a moodle link and authentication information like this:
python main.py -u USER -p PASSWORD -d /moodle -m https://moodlearchive.epfl.ch/2019-2020/
If providing an url that doesn't end with the year, you must specify the year like this:
python main.py -u USER -p PASSWORD -d /moodle -m https://moodle.epfl.ch/ -y 2023-2024
For speed or storage reasons you can tell the script to not download a specific kind of file:
python main.py -u USER -p PASSWORD -d /moodle -m https://moodlearchive.epfl.ch/2019-2020/ -i mp4 -i mov
| argument | short | example |
|---|---|---|
| --username | -u | username |
| --password | -p | superstrongpassword |
| --moodle_url | -m | https://moodle.epfl.ch/ |
| --academic_year | -y | 2023-2024 |
| --storage_dir | -d | /moodle |
| --ignore_extension | -i | mp4 |
Planned
- Download submission files
- Create url files for secondary urls
Description
Languages
Python
100%