Skip to content

Simple script to generate a JSON feed for train tickets from GWR.com

License

Notifications You must be signed in to change notification settings

leonghui/gwr-feed

Repository files navigation

gwr-feed

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.

  1. Set your timezone as an environment variable (see docker docs): TZ=America/Los_Angeles

  2. Access the feed using the URL with origin and destination station codes: http://<host>/?from=BHM&to=EUS

  3. 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

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:

About

Simple script to generate a JSON feed for train tickets from GWR.com

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages