Overview
For a long time, I struggled with last-minute travel. Whether for business or family, sudden trips meant scrambling for intercity bus tickets—often on the same day or the next. But like many Iranians, I faced a common issue: by the time you check, all the tickets are gone.
And yet, I knew this wasn't always the end of the story. Canceled tickets pop up randomly. The real challenge? Catching them faster than everyone else.
So I thought to myself: why not automate this?
The Problem
When you're chasing canceled tickets, you're stuck in a brutal loop:
-
Refreshing ticket pages every few seconds
-
Hoping someone cancels their seat
-
Competing with others doing the exact same thing
-
Missing out while you're asleep, away, or simply distracted
Even though websites like Safar724 made booking easier, they didn’t notify users of cancellations. That's when the idea hit me: let’s build a bot to watch the site for me—nonstop, day and night.
The Solution
I developed a web application named Ticketyab that:
-
Takes your origin, destination, date, time range, and phone number
-
Uses Selenium with headless Chrome to monitor [Safar724] in real-time
-
Sends you an SMS alert via Faraz SMS the moment a ticket appears in your desired window
-
Runs on a Linux server so you don’t even need your laptop online
From an architecture point of view, it's powered by:
-
Django
(for backend and admin panel) -
Selenium
(for automated browsing & dynamic scraping) -
PostgreSQL
/SQLite
(for search records) -
Faraz SMS
API (for instant mobile notifications)
I even built a simple UI so users can submit their search parameters through a browser. No CLI, no technical setup required.
What This Project Demonstrates
Besides being useful in real life, this project showcases several important skills:
-
End-to-End Full Stack Automation
-
Real-Time Scraping of JavaScript-heavy websites
-
Headless Browser Deployment on Ubuntu Server
-
Django Forms, Views, Admin, and Background Tasks
-
Secure API usage (via
.env
and token-based services) -
User-oriented design & notification-based UX
It also demonstrates an important mindset for data scientists and developers:
💡 Don't just analyze problems. Build things that solve them.
Try it or Fork it
Want to explore the code or build on it?
👉 View the GitHub Repository
👉 Connect with me on LinkedIn