Skip to content
This repository has been archived by the owner on Nov 27, 2022. It is now read-only.

vitaliyp/ticketcheck

Repository files navigation

ticketcheck

Script that monitors Ukrainian Railroad (Укрзалізниця) booking site (https://booking.uz.gov.ua) and sends email notification when desired tickets are available.

Configuration

File settints.json contains application settings:

{
  "email":{
    "server":"smtp.example.org:port",
    "username":"[email protected]",
    "password":"secretpassword"
  }
}

File monitors.json contains a list of objects. Each object specifies departure station, departure date, and destination station. Every time the script is executed, it iterates over all of this objects and checks if tickets with specified parameters have became available.

[{
  "departure_date":"2015.4.2",
  "departure_station":"Київ",
  "destination_station":"Івано-Франківськ",
  "classes":[3],
  "email":"[email protected]"
}]

classes field is a list and specifies seats classes which should be monitored i.e. 1 represents the first class. email in an address which is used to send notifications.

In order to run script, proper sqlite3 database should be created:

$ sqlite3 db.sqlite3 < createdb.sql

Running script

$ python3 ticketcheck.py

About

Monitor Ukrainian Railway tickets.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages