Small automation script to log into the LSF portal, fetch the "Notenspiegel" table and summarize grades/points.
- Logs into LSF using Selenium
- Navigates to the Notenspiegel page and extracts table rows
- Calculates average grade and total points
- Outputs on the console the course name, grade and points received
- Writes runtime logs to
logs/
- Clone the repository:
git clone https://github.com/tiagomorato/lsf-automation.git
cd lsf-automation- Create and activate a Python virtual environment:
python -m venv .venv
source .venv/bin/activate- Install project dependencies declared in
pyproject.toml.
If you use pip (will build and install the project and its dependencies):
pip install .- Create a
.envfile in the project root and add your credentials:
LOGIN=your_username
PASSWORD=your_password
- Run the automation script:
python lsf_automation.pyEnsure Google Chrome (or Chromium) is installed and a compatible ChromeDriver is available on your PATH.
-
Version compatibility: Chrome and ChromeDriver must have matching major versions (for example Chrome 116 → ChromeDriver 116). If versions differ you may see session or startup errors.
-
Installing ChromeDriver:
- Linux (Debian/Ubuntu):
sudo apt install chromium-chromedriver(package name and availability vary by distro). - Manual: download the matching driver from https://chromedriver.chromium.org/downloads and place it on your
PATH.
- Linux (Debian/Ubuntu):
-
Alternative (recommended): use
webdriver-managerto automatically download the correct driver:
pip install webdriver-managerExample Python usage with webdriver-manager:
from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager
driver = webdriver.Chrome(ChromeDriverManager().install())Using webdriver-manager avoids manual driver installs and version mismatch issues.
Logs are written into the directory specified by LOG_DIR (default: logs). Log filename includes a timestamp.