commit e8c9fbba0e5b016bf7cf86d043a804c9d5ab2a4f
parent 44b0cfc4cca7eb08ebf979dd1a58af88233aa80a
Author: Christoph Lohmann <20h@r-36.net>
Date: Mon, 29 May 2023 11:30:04 +0200
Remove specific emirates stuff.
Panasonic v2 is out. The data is yet to be decoded. There are
documentation examples of using json. But this wasn't JSON.
Sadly I lost the recording. Off for the next flight.
Diffstat:
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/inflight-status b/inflight-status
@@ -27,8 +27,8 @@ def main(args):
flightdatauris = {
"panasonic": "http://services.inflightpanasonic.aero/inflight/services/flightdata/v1/flightdata",
- "airfrance": "https://connect.airfrance.com/ach/api/flightdata",
- "emirates": "https://portal.inflight.onair.aero/ac/UAE/en/connect"
+ "panasonic": "http://services.inflightpanasonic.aero/inflight/services/flightdata/v2/flightdata",
+ "airfrance": "https://connect.airfrance.com/ach/api/flightdata"
}
useproxy = False
@@ -63,6 +63,7 @@ def main(args):
return 1
if statustype == "panasonic":
+ # TODO: Decoding of v2 data?
flightdata = fd.json()
tablehdr = "flight %s from %s to %s" % (
flightdata["td_id_fltdata_flight_number"],
@@ -102,9 +103,6 @@ def main(args):
nnfd = lineardict(flightdata)
- elif statustype == "emirates":
- tablehdr = "Emirates sucks at doing proper flight status."
-
if nnfd != None:
nnfdkeys = list(nnfd.keys())
nnfdkeys.sort()