Stop refreshing course pages like it's 2010! This intelligent, battle-tested Python application automatically hunts for open spots in your dream courses at Ontario Tech University and instantly alerts you via SMS the moment seats become available. Powered by cutting-edge Selenium web automation, Twilio's reliable SMS infrastructure, and smart scheduling with APScheduler.
Time is money, and this tool gives you both back! Instead of:
- ❌ Manually checking course pages every 15 minutes
- ❌ Setting 10 alarms throughout the day
- ❌ Losing sleep worrying about missing registration windows
- ❌ Missing out on popular courses that fill up in seconds
You get:
- ✅ Automated 24/7 Monitoring - Works while you sleep, study, or binge Netflix
- ✅ Instant SMS Alerts - Get notified in seconds, not minutes
- ✅ Zero Manual Effort - Set it and forget it!
- ✅ Peace of Mind - Focus on what matters while the bot does the watching
- 🔍 Smart Course Tracking: Continuously monitors multiple courses simultaneously at custom intervals
- 📱 Lightning-Fast SMS Alerts: Real-time Twilio notifications delivered straight to your phone
- 🌐 Intelligent Web Scraping: Bulletproof Selenium automation with Chrome for 99.9% reliability
- ⚙️ Super Configurable: Customize everything via simple environment variables - no coding needed!
- 📊 Professional Logging: Track every check with detailed, color-coded logs
- 🔄 Graceful & Clean: Proper startup/shutdown with automatic resource management
- 🛡️ Industrial-Strength Error Handling: Self-recovers from failures and keeps running
- 🎯 Duplicate Prevention: Won't spam you with repeated notifications for the same course
- Python 3.8+ (the newer, the better!)
- Chrome or Chromium browser
- Free Twilio account (takes 2 minutes to setup)
- Your university login credentials
- Grab the code and jump in:
git clone https://github.com/KaranBhaskar/course_notifier
cd course_notifer- Set up your configuration:
cp .env.example .env
# Edit .env with your credentials (Twilio, university login, course codes)- Launch and let it work its magic:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
python app.py # 🎉 You're live!All configuration is done through environment variables in a .env file:
- Copy the example file:
cp .env.example .env - Edit
.envwith your actual values - Check
.env.examplefor detailed comments on each setting
- Head to twilio.com and grab a free account
- Snag your Account SID and Auth Token from the dashboard (big red button, can't miss it!)
- Get a phone number (free trial number works perfectly for testing)
- Add your cell number to receive those sweet, sweet notifications
- Twilio credentials (SID, Token, phone numbers)
- Course codes to monitor
- Check interval (how often to scan)
- University login credentials
- Optional: Browser settings, logging preferences
See .env.example for the complete list with detailed descriptions!
- Drop your credentials and course codes into the
.envfile - Fire up the app with
python app.py - Watch the magic happen! The bot will:
- 🏃♂️ Check course availability immediately
- ⏰ Keep monitoring on autopilot at your chosen interval
- 📲 Blast you an SMS the instant a spot opens up
- 📝 Log everything so you can see exactly what's happening
Got a different school? No problem! The scraper is designed to be university-agnostic. Just tweak a few things:
-
Update URLs in
config.py:- Change
BASE_URLto match your school's course search page - Adjust
format_course_url()inhelpers.pyif your URLs are structured differently
- Change
-
Modify HTML Parsing in
course_scraper.py:- Update the
check_course()method to target your university's specific HTML structure - Tweak the regex patterns that extract seat numbers
- Update the
-
Adapt Login Flow (if your school requires it):
- Modify
login_if_needed()with the correct form selectors - Add your credentials to the environment variables
- Modify
Every university has its own style - we've got you covered:
# Ontario Tech style
COURSE_CODES=CSCI2010,MATH1010U
# Simple numeric codes
COURSE_CODES=CS101,MATH205,PHYS301
Built with best practices and modularity in mind:
course_notifier/
├── config.py # 🎛️ All your settings in one place
├── helpers.py # 🔧 Helper functions and logging magic
├── course_scraper.py # 🕷️ Selenium-powered web scraping engine
├── sms_notifier.py # 📱 Twilio SMS notification system
├── course_monitor.py # ⏱️ Smart job scheduling orchestrator
├── app.py # 🚀 Launch pad for the entire system
├── requirements.txt # 📦 All dependencies listed
- CourseScraper: Your tireless web-scraping robot using Selenium and Chrome
- NotificationService: Smart Twilio integration with built-in spam prevention
- CourseMonitor: The brain of the operation - coordinates everything with APScheduler
- Configuration: Bulletproof config management with built-in validation
- Keep
.envsacred - never commit it to version control! - Use environment variables in production - no hardcoded secrets!
- Rotate credentials regularly - security 101
- Chrome profile saves login state - convenient AND secure
- Update dependencies often - patch those vulnerabilities!
🎉 Pro Move: Star this repo if it saves you time - it helps others discover it too!