Skip to content
Webcrawler and filter scripts for ZRH arrivals and departures
Branch: master
Clone or download
Pull request Compare This branch is 2 commits ahead, 18 commits behind dxmekch:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


(formerly: mnemocron/ZRHMovementsSpottertool)

This Python script can fetch the full arrival / departure list of the Zürich airport (ZRH). The output format is 'json'. There are multiple lists available. Both the arrivals and depatrures of regular civil flights, as well as both the arrivals and departures of all available flights (including private and freight flights). Typically a regular list contains ~400 flights per day, while a spotter list contains ~450 flights.

Furthermore there is a dict.json that contains further information for given registration numbers.


Download Timetables

Get the arrival list (today / regular): $ -a

Get the departure list (toady / regular): $ -d

Get all four available lists of today: $ -dau

Get all four available lists of tomorrow: $ -daut

Filter Timetables

Filter out the special flights:

$ -r [regular] -s [spotter] [-o][dir] [-v]


$ -r timetable.arrival.regular.json -s timetable.arrival.spotter.json -o ./flighttables

The option -o [dir] is used to set the output directory (not filename) of the filtered timetable.json - if there is already a timetable.[x].special.json, this file will be overwritten

The option -v enables verbos output for further use. You can pipe this output to a Telegram chat for example.

Example Cronjob

cd /home/pi/workspace/zrh
rm timetable.arrival.spotter.json
rm timetable.arrival.standard.json
rm timetable.departure.spotter.json
rm timetable.departure.standard.json
rm timetable.arrival.tom.spotter.json
rm timetable.arrival.tom.standard.json
rm timetable.departure.tom.spotter.json
rm timetable.departure.tom.standard.json


./ timetable.arrival.standard.json timetable.arrival.spotter.json | awk '!x[$0]++' > temparrtod.txt
./ timetable.arrival.tom.standard.json timetable.arrival.tom.spotter.json | awk '!x[$0]++' > temparrtom.txt
cat temparrtod.txt temparrtom.txt > temparr.txt
./ timetable.departure.standard.json timetable.departure.spotter.json | awk '!x[$0]++' > tempdeptod.txt
./ timetable.departure.tom.standard.json timetable.departure.tom.spotter.json | awk '!x[$0]++' > tempdeptom.txt
cat tempdeptod.txt tempdeptom.txt > tempdep.txt

Output Format

The output format is a json file. The structure is taken from the old ZRH website API.


		"airportinformation": {
			"airport_city": "DUBLIN"
		"flightcode": "EI349",
		"masterflight": {
			"registration": "EIDEN"
		"scheduled": "20:05", 
		"expected" : "20:20"
		"airportinformation": {
			"airport_city": ""
		"flightcode": "",
		"masterflight": {
			"registration": ""
		"scheduled": "", 
		"expected" : "0"


Before you can use the script you need to edit the headers. The website requires the cookie parameters to be set. Open your browser and look inside the developer tools to find the cookie headers. Copy them into the file.

If the cookie headers are not set, the script will fail with AttributeError: 'NoneType' object has no attribute 'tbody'.


Python 2.7

Packages used:

  • optparse
  • sys
  • os
  • datetime
  • httplib
  • urllib
  • requests
  • bs4 / BeautifulSoup
  • json

You can’t perform that action at this time.