Automatically monitors r/glasgow and r/glasgowmarket for posts containing keywords like “free ticket”, “giveaway”, etc., and sends email notifications when matches are found.
Features
🔍 Monitors multiple subreddits simultaneously
📧 Email notifications with post details and direct links
🚫 Duplicate detection to avoid repeat notifications
⚙️ Fully configurable keywords and settings
🆓 Completely free to run (uses only free services)
Use this App Password (not your regular password) in the configuration
3. Local Setup
# Clone and enter the repository
git clone https://github.com/abhibansal60/glasgow-reddit-monitor.git
cd glasgow-reddit-monitor
# Install dependencies
pip install -r requirements.txt
# Copy and configure environment variables
cp .env.example .env
# Edit .env with your credentials (see Configuration section)
# Run the monitor
python main.py
4. GitHub Actions Setup (Free Cloud Automation)
Fork this repository to your GitHub account
Go to your repository Settings → Secrets and Variables → Actions
Add the following secrets:
Secret Name
Description
Example
REDDIT_CLIENT_ID
Reddit app client ID
abc123xyz
REDDIT_CLIENT_SECRET
Reddit app client secret
def456uvw
REDDIT_USER_AGENT
Reddit app user agent
GlasgowRedditMonitor/1.0
EMAIL_USER
Your Gmail address
your.email@gmail.com
EMAIL_PASSWORD
Gmail App Password
abcd efgh ijkl mnop
NOTIFICATION_EMAIL
Where to send alerts
alerts@gmail.com
KEYWORDS
Comma-separated keywords
free ticket,giveaway,discount
Optional secrets (will use defaults if not set):
SMTP_SERVER (default: smtp.gmail.com)
SMTP_PORT (default: 587)
CHECK_INTERVAL_MINUTES (default: 15)
MAX_POSTS_PER_RUN (default: 50)
The workflow will run automatically every 15 minutes
You can also trigger it manually from the Actions tab
Glasgow Reddit Monitor 🎫
Automatically monitors r/glasgow and r/glasgowmarket for posts containing keywords like “free ticket”, “giveaway”, etc., and sends email notifications when matches are found.
Features
Quick Start
1. Set up Reddit API
client_id(under the app name) andclient_secret2. Set up Gmail for notifications
3. Local Setup
4. GitHub Actions Setup (Free Cloud Automation)
REDDIT_CLIENT_IDabc123xyzREDDIT_CLIENT_SECRETdef456uvwREDDIT_USER_AGENTGlasgowRedditMonitor/1.0EMAIL_USERyour.email@gmail.comEMAIL_PASSWORDabcd efgh ijkl mnopNOTIFICATION_EMAILalerts@gmail.comKEYWORDSfree ticket,giveaway,discountOptional secrets (will use defaults if not set):
SMTP_SERVER(default:smtp.gmail.com)SMTP_PORT(default:587)CHECK_INTERVAL_MINUTES(default:15)MAX_POSTS_PER_RUN(default:50)Configuration
Environment Variables
Copy
.env.exampleto.envand configure:Monitored Subreddits
Currently monitors:
Default Keywords
How It Works
seen_posts.jsonreddit_monitor.logRunning Modes
Files Generated
seen_posts.json- Tracks processed posts to avoid duplicatesreddit_monitor.log- Detailed activity logsCost Analysis ✅ 100% Free
Troubleshooting
Common Issues
Reddit API Errors:
REDDIT_CLIENT_IDandREDDIT_CLIENT_SECRETREDDIT_USER_AGENTis descriptiveEmail Issues:
GitHub Actions Issues:
Debugging
Check logs for detailed error information:
Testing
Test email functionality:
Customization
Adding More Subreddits
Edit
main.py, modify thesubredditslist:Custom Keywords
Update your
.envfile or GitHub secrets:Different Email Provider
For Outlook/Hotmail:
Contributing
License
MIT License - feel free to use and modify as needed.
Support
For issues or questions:
reddit_monitor.logHappy monitoring! May you never miss a free ticket again! 🎟️