A simple Python script to generate a JSON Feed for search for train tickets on Great Western Railway. Only supports single (one-way) journeys.
Served over Flask!
Use the Docker build to host your own instance.
-
Set your timezone as an environment variable (see docker docs):
TZ=America/Los_Angeles
-
Access the feed using the URL with origin and destination station codes:
http://<host>/?from=BHM&to=EUS
-
Optionally, specify a:
- date (yyyyMMdd):
http://<host>/?from=BHM&to=EUS&on=20221225
- time (hhmm):
http://<host>/?from=BHM&to=EUS&at=1200
- number of weeks to look ahead:
http://<host>/?from=BHM&to=EUS&weeks=2
- or any combination of the above
- date (yyyyMMdd):
Note: set a longer timeout on your feed reader if you use the 'weeks' option
E.g.
Train prices from MAN (Manchester Piccadilly) to PAD (London Paddington) at 9pm:
Feed link:
http://<host>/?from=MAN&to=PAD&at=2100
Tested with: