ADSBexchange.com

BETAALD
Door ADSBexchange.com | Bijgewerkt 2 months ago | Transportation
Populariteit

9.7 / 10

Latency

168ms

Serviceniveau

100%

Terug naar alle discussies

No flight data received with the API

avatar
jerrycd
a year ago

There was no airplane data retrieved with the folloiwng Python scripts. Could anyone help me please? Thansk in advance!

Returned string:
{‘states’: [], ‘time’: 1608711590}

Python scripts:
import http.client

conn = http.client.HTTPSConnection(“adsbexchange-com1.p.rapidapi.com”)

headers = {
‘x-rapidapi-key’: “”,
‘x-rapidapi-host’: “”
}

conn.request(“GET”, “/icao/78048f/”, headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode(“utf-8”))

avatar
AVIARLabs commented a year ago

I don’t code in python, but I’m sure You’re missing the header info, the key and host, which are provided by Rapid. Add those and you should be good.

Doe mee aan de discussie - voeg hieronder een opmerking toe

Log in / Schrij u in om nieuwe opmerkingen te plaatsen
Beoordeling: 2 - Stemmen: 5