Automated web scraper to poll course enrollment status on minerva, and ping via webhook when seats/waitlist spots open up.
The only requirement is to have a server with docker installed (and old laptop can do just fine). Preferably, it should have a constant up-time so as to not miss any seat openings.
- Setup your webhook (e.g. Discord, Slack) and get the URL.
cp .env.example .env- Fill in your minerva credentials and webhook URL in the
.envfile.
USERNAME=your_minerva_username
PASSWORD=your_minerva_password
WEBHOOK_URL=your_webhook_url- Define your courses in
courses.yamlin the following format (no particular ordering of terms or courses is required):
terms:
F2025:
- COMP202
- MATH240
W2026:
- LING210
S2026:
- PHYS183
<term>:
- <section><number>Warning
Only one instance of the scraper can be running at a time since minerva does not like multiple logins from the same account - you might notice the scraper crashing while you are browsing minerva.
- Docker (Recommended)
docker-compose up --build- Local development
python -m src.minerva --config config.yaml --localTo automate the scraper, you can set up a cron job to run the scraper container at regular intervals. First, make sure your script is executable:
chmod +x /path/to/run_scraper.shThen, open the crontab file for editing:
crontab -eAnd add the following line to schedule the scraper:
# e.g. Run every 30 minutes
*/30 * * * * /path/to/run_scraper.sh
The next logical step would be to add auto-enrollment functionality. In hindsight, this is quite easy to implement, but it would require a lot of testing to make sure it works reliably (i.e. does not mess up with other registered courses).
The other problem is that there is a limit to the number of credits a student can be enrolled in, so a priority system might be interesting to consider.