How souhardyaghosh/irctc_seat_availibilty works
This repository provides train-seat availability lookups through a Flask endpoint and standalone command-line crawlers. The main documented workflow accepts a station pair, class, date, and train number; it resolves a CAPTCHA, looks up train details, requests availability, and returns the result. The crawler variants additionally fetch a train list and schedule before checking availability. Source excerpts support these paths and their external requests; api_correct.py appears incomplete, so its intended train-data request is not represented as a working integration.
Main entry points: api_a.py Availability API · crawl.py List and schedule lookup · api_correct.py Train API draft · crawlb.py CLI crawler
Components 12
User interfaces
- Availability API
api_a.py - Train API draft
api_correct.py - CLI crawler
crawl.py - CLI crawler
crawla.py - CLI crawler
crawlb.py
Train lookup
- CAPTCHA handling
api_a.py - Train lookup
api_a.py - Availability lookup
api_a.py - List and schedule lookup
crawl.py
External services
- Indian Rail enquiry
- OCR service
Other components
- Requester
Connections 16
- Requester → Availability API: requests
README.md - Availability API → CAPTCHA handling: solves CAPTCHA
api_a.py - Availability API → Train lookup: looks up train
api_a.py - Availability API → Availability lookup: checks availability
api_a.py - CAPTCHA handling → Indian Rail enquiry: fetches image
api_a.py - CAPTCHA handling → OCR service: submits image
api_a.py - Availability API → Indian Rail enquiry: resolves stations
api_a.py - Train lookup → Indian Rail enquiry: requests train data
api_a.py - Availability lookup → Indian Rail enquiry: requests fare data
api_a.py - CLI crawler → List and schedule lookup: runs lookup
crawl.py - CLI crawler → List and schedule lookup: runs lookup
crawla.py - CLI crawler → List and schedule lookup: runs lookup
crawlb.py - List and schedule lookup → Indian Rail enquiry: requests train data
crawl.py - CLI crawler → OCR service: submits CAPTCHA
crawlb.py - Train API draft → OCR service: submits CAPTCHA
api_correct.py - Train API draft → Indian Rail enquiry: intended train request