Base
This commit is contained in:
parent
6080faabc8
commit
72bdae405c
20
datapull.py
Normal file
20
datapull.py
Normal file
|
@ -0,0 +1,20 @@
|
|||
"""
|
||||
Little script written by Arnold Dechamps
|
||||
"""
|
||||
import config
|
||||
import requests
|
||||
|
||||
apiUrl = "https://aeroapi.flightaware.com/aeroapi/"
|
||||
|
||||
airport = 'EBBR'
|
||||
payload = {'max_pages': 2}
|
||||
auth_header = {'x-apikey':config.FLIGHTAWAREKEY}
|
||||
|
||||
response = requests.get(apiUrl + f"airports/{airport}/flights",
|
||||
params=payload, headers=auth_header)
|
||||
|
||||
if response.status_code == 200:
|
||||
print(response.json())
|
||||
else:
|
||||
print("Error executing request")
|
||||
|
Loading…
Reference in a new issue