Tokyo Train Status feat Yahoo Japan

How It Works

Maid-chan feat Yahoo Japan provides real-time notification for Tokyo train status which are defined to be monitored. Currently, there are 3 monitored train lines: Tokyu Den-en-toshi Line, Nambu Line, and Tokyu Oimachi Line.


Since the retrieved data is HTML-formatted, we need to parse the data that we want with BeautifulSoup. In addition, the raw data from Yahoo Japan is all written in Japanese, therefore, we need to do some pre-processing to translate those data to English. When the translation is not found in the defined constant, Maid-chan’s Google Translate feature is used for providing automatic translation.

Notification will be sent when the train status is changed, e.g.: from “Normal Operations” to “Operations temporarily suspended”, from “Operations temporarily suspended” to “Delays”, etc.

How to Run

  1. Ensure you have translate-shell installed (for automatic translation, see Translate text via Google Translate).
  2. You can start running scheduler by executing:
$ maidchan_scheduler
  1. You can subscribe & unsubscribe to Maid-chan’s Tokyo train status notification via subscribe train and unsubscribe train command in the Messenger.

Special Thanks

Special thanks to Jonas Obrist (ojii) for providing tokyotrainstatus codebase.