This repository contains a Python-based automation script that periodically scrapes job listings from python.org, filters them based on keywords, stores them in a local SQLite database, and sends email notifications when new jobs are found.
This project is intended for learning and experimentation with:
- Python automation
- Web scraping
- Persistence
- Error handling
- Scheduling
It is not a production system and not intended as a résumé project.
On each run, the script:
- Fetches job listings from https://www.python.org/jobs/
- Parses job data from HTML
- Filters jobs using predefined keywords
- Stores jobs in a SQLite database (deduplicated by link)
- Sends an email only if new jobs are added
- Logs all activity and errors
- Retries failed network requests with exponential backoff
job_automation/
│
├── main.py
├── config.py
├── requirements.txt
├── .env # not committed
│
├── automation/
│ ├── fetch.py
│ ├── process.py
│ ├── database.py
│ ├── emailer.py
│ └── logger.py
│
├── data/
│ └── processed/
│ └── jobs.db
│
├── logs/
│ └── job_automation.log
│
└── run_job_automation.bat
- Python 3.9+
- Windows (for Task Scheduler setup)
Python packages are listed in requirements.txt.
python -m venv venv
venv\Scripts\activatepip install -r requirements.txt
Email notifications use Gmail with an App Password.
Create a .env file in the project root:
EMAIL_ADDRESS=your_email@gmail.com
EMAIL_PASSWORD=your_app_password
EMAIL_TO=your_email@gmail.com
The .env file is intentionally excluded from version control.
Edit config.py to adjust:
- Job URL
- Keyword filters
- Retry behavior
Example:
KEYWORDS = ["python", "django", "backend", "remote"]
MAX_RETRIES = 3
INITIAL_DELAY = 2
Manual run:
python main.py
Expected behavior:
- First run inserts jobs and sends an email
- Subsequent runs insert nothing and send no email
Use Task Scheduler with the provided batch file:
run_job_automation.bat
This allows the script to run unattended on a schedule.
Logs are written to:
logs/job_automation.log
Includes timestamps, job counts, and full error tracebacks.
- SQLite is used for simplicity and local persistence
- Deduplication is enforced at the database level
- Network failures are handled with retries and backoff
- This project prioritizes correctness and learning over features
MIT