diff --git a/README.md b/README.md index 19fc246..99e21cf 100644 --- a/README.md +++ b/README.md @@ -124,7 +124,6 @@ python3 NotifyBotMulti.py ### TODO - General Cleanup -- Add ADSBX V2 use (not really possible unless theyd give me access, luckly if we get to keep V1 use ADSBX may be taking away Free API apparently, THANKS ALOT) -- Get rid of landing/takeoff by data loss/aqquision instead use to last contact timeout for landing. +- Add ADSBX V2 use (not really possible unless i get access, luckly if i to keep V1 use ADSBX may be taking away Free API possibly THANKS ALOT PPL who have to abuse) ### [More Refrences/Documentation](Refrences.md) diff --git a/defADSBX.py b/defADSBX.py index 4cb80eb..f45c298 100644 --- a/defADSBX.py +++ b/defADSBX.py @@ -57,15 +57,13 @@ def pullADSBX(planes): if "response" in locals(): print ("HTTP Status Code:", response.status_code) if failed is False: - data_ctime = float(data['ctime']) / 1000.0 - print("UTC of Data:",datetime.utcfromtimestamp(data_ctime)) - print("Current UTC:", datetime.utcnow()) try: - if data['msg'] == 'You need a key. Get a feeder or use pay API. https://rapidapi.com/adsbx/api/adsbexchange-com1': - print("Bad auth", data['msg']) + if data['msg'] != "No error": + raise Exception("Error from ADSBX: msg = ", data['msg']) failed = True except KeyError: pass + data_ctime = float(data['ctime']) / 1000.0 + print("UTC of Data:",datetime.utcfromtimestamp(data_ctime)) + print("Current UTC:", datetime.utcnow()) return data, failed - -