Updated README
Added retries mechanism
Fixed typo
Short script to download courses from the REPLACE_ME platform. Need to set the username and the password as environment variables.
Some files are getting redownloaded everytime, from the little I've seen this mostly concerns the interactive html module, they change etag every single time, so there isn't much to do.
python3 -m build
pip3 install dist/Download... .whl
usage: download-REPLACE_ME-courses [-h] --city CITY [--promotion PROMOTION] [-o OUTPUT_DIR] [--debug]
options:
-h, --help show this help message and exit
--city CITY The city to select the correct REPLACE_ME platform.
--promotion PROMOTION
The exact promotion name and year, ex: 'REPLACE_MEREPLACE_ME'
-o OUTPUT_DIR, --output-dir OUTPUT_DIR
Output dir, Default is home dir
--debug Verbose output.
export REPLACE_ME_USERNAME=<username>
export REPLACE_ME_PASSWORD=<password>
download-REPLACE_ME-courses --city REPLACE_ME --promotion REPLACE_MEREPLACE_ME -o ~/Téléchargements
or
REPLACE_ME_USERNAME=<user> REPLACE_ME_PASSWORD=<password> download_REPLACE_ME_courses --city REPLACE_ME --promotion REPLACE_MEREPLACE_ME -o ~/Téléchargements
If you use a password manager you can do something like this :
REPLACE_ME_USERNAME=$(pass REPLACE_ME/user | tail -1 | cut -d: -f2 - | cut -c2-) REPLACE_ME_PASSWORD=$(pass REPLACE_ME/user | head -1) download_REPLACE_ME_courses --city REPLACE_ME --promotion REPLACE_MEREPLACE_ME -o ~/Téléchargements
tox