This Python script automates the process of logging into ILIAS, downloading course materials, and extracting ZIP files. It leverages the Selenium
library for browser automation, enabling the bulk download of multiple course materials at once. The script is designed to work with Microsoft Edge and therfore currently supports Windows only.
- all_ILIAS_down: Downloads all course materials with a single click.
- selected_ILIAS_down: Allows you to choose which courses to download.
Please note that the script is still under development and may encounter issues with certain tasks, particularly when handling courses with a large amount of data. If you experience any issues, feel free to provide feedback!
- Python 3.x
- Selenium (
pip install selenium
) - Microsoft Edge WebDriver
Ensure that you have Python installed and set up. Then, install the required Python package Selenium
:
pip install selenium
Download the appropriate version of Microsoft Edge WebDriver from here.
Ensure the msedgedriver
is on your system's PATH, or specify the path to the msedgedriver
executable in the script.
Update the following placeholders in the script with your actual values:
USERNAME
: Your portal username.PASSWORD
: Your portal password.BASE_URL
: The base URL of your portal (e.g., "https://ilias.studium.kit.edu").DOWNLOAD_FOLDER
: The folder where the downloaded files will be stored (e.g., "C:\Users\user\Documents\Downloads").
Execute the script with Python:
python all_ILIAS_down.py
Configures the Edge WebDriver to run in headless mode and sets up the download and cache folder.
Logs into the portal using provided credentials.
Retrieves available course links and names from the membership overview page.
Downloads course materials by selecting available checkboxes on the course's download page.
Waits for all downloads to complete by checking for .crdownload
files in the specified download folder.
Extracts any ZIP files in the download folder and moves the extracted contents to the final destination folder.
Normalizes file paths for compatibility across different operating systems.
Normalizes text for file and folder name compatibility by replacing special characters.
Sanitizes file and folder names to remove any unwanted spaces or special characters.
- Headless Mode: The script runs the WebDriver in headless mode for efficiency (no browser window will open).
- Error Handling: The script includes basic error handling for cases where some files might fail to download or unzip.
- Course Exclusions: Specific courses may require additional actions (e.g., unchecking supplementary material), which is handled automatically for courses with certain IDs.
- File Overwriting: The script handles existing files by overwriting them during extraction.
- If the download does not complete, ensure the
download_folder
is accessible and has enough space. - If ZIP extraction fails, check for permission issues with the destination folder.
- Ensure that
msedgedriver
is properly installed and accessible.
This project is licensed under the MIT License - see the LICENSE file for details.