Website Scraper for LSZB Airport arrivals/departures Table. Serves the arrivals/departures Table as a JSON API (files).
This script downloads the html table from the LSZB website: bernairport.ch and parses it into two timetable.json
files.
python3 get-lszb.py --help
Usage: get-lszb
Options:
-h, --help show this help message and exit
-o OUTDIR, --outdir=OUTDIR
[optional] output directory
-s, --single-file [optional] merge arrival/departures into single file
Use the -o
parameter to specify the output directory.
python3 get-lszb.py -o belp/
Outputs: belp/arrivals.timetable.json
and belp/departures.timetable.json
{
"data": [
{
"flightNo": "NJE794R",
"airport": "Ljubljana",
"via": "",
"scheduledTime": "12:30",
"estimatedTime": "",
"gate": "",
"status": "",
"privateflight": "Private Flight",
"direction" : "arrival"
}
]
}
LICENSE
Apache License 2.0
(c) 2020 Simon Burkhardt