Merge pull request #9 from altf4arnold/datapull

fixing datapull
This commit is contained in:
Arnold Dechamps 2024-03-20 14:04:01 +01:00 committed by GitHub
commit c6183453c4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -18,7 +18,6 @@ def grabber():
response = requests.get(apiUrl + f"airports/{airport}/flights/scheduled_departures", params=payload,
headers=auth_header)
print("Flight Operator Time Destination acft-type")
if response.status_code == 200:
departures = response.json()["scheduled_departures"]
else:
@ -33,6 +32,7 @@ if __name__ == '__main__':
scheduled_off = "unknown"
destination = "unknown"
acfttype = "unknown"
print("Flight Operator Time Destination acft-type")
for flight in departures:
if flight["ident"] is not None:
name = flight["ident"]