Merge branch 'multi' of https://github.com/Jxck-S/plane-notify into multi
This commit is contained in:
commit
a986beb950
|
@ -124,7 +124,6 @@ python3 NotifyBotMulti.py
|
||||||
### TODO
|
### TODO
|
||||||
|
|
||||||
- General Cleanup
|
- 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)
|
- 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)
|
||||||
- Get rid of landing/takeoff by data loss/aqquision instead use to last contact timeout for landing.
|
|
||||||
|
|
||||||
### [More Refrences/Documentation](Refrences.md)
|
### [More Refrences/Documentation](Refrences.md)
|
||||||
|
|
12
defADSBX.py
12
defADSBX.py
|
@ -57,15 +57,13 @@ def pullADSBX(planes):
|
||||||
if "response" in locals():
|
if "response" in locals():
|
||||||
print ("HTTP Status Code:", response.status_code)
|
print ("HTTP Status Code:", response.status_code)
|
||||||
if failed is False:
|
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:
|
try:
|
||||||
if data['msg'] == 'You need a key. Get a feeder or use pay API. https://rapidapi.com/adsbx/api/adsbexchange-com1':
|
if data['msg'] != "No error":
|
||||||
print("Bad auth", data['msg'])
|
raise Exception("Error from ADSBX: msg = ", data['msg'])
|
||||||
failed = True
|
failed = True
|
||||||
except KeyError:
|
except KeyError:
|
||||||
pass
|
pass
|
||||||
|
data_ctime = float(data['ctime']) / 1000.0
|
||||||
|
print("UTC of Data:",datetime.utcfromtimestamp(data_ctime))
|
||||||
|
print("Current UTC:", datetime.utcnow())
|
||||||
return data, failed
|
return data, failed
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue