qtile transport widget for Munich

After settling down in Munich I managed to adjust the qtile window manager widget I created for Zurich to the Munich public transport system.

There is neither an open data provider like in Zurich nor an official API documentation by the MVG but nevertheless, since www.mvg.de uses a beautifully responsive JavaScript FrontEnd to query connections, using FireBug one can find the following request

GET https://www.mvg.de/fahrinfo/api/routing/?fromStation=40&toStation=1260

with the following http header

which can be used to perform the queries. The results are again provided in JSON such that only small changes of the ZH version of the widget are necessary.

The full code is shown below.

This entry was posted in Linux, Python and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *