fix(adsb): update Planespotters User-Agent to include contact URL

Planespotters.net now requires a descriptive User-Agent with a contact
URL or email — generic strings return 403. Updated to comply with their
API policy.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
James Smith
2026-05-21 21:34:42 +01:00
parent 9c15ece508
commit d68d1ec53a
+3 -1
View File
@@ -1786,7 +1786,9 @@ def aircraft_photo(registration: str):
try:
# Planespotters.net public API
url = f"https://api.planespotters.net/pub/photos/reg/{registration}"
resp = requests.get(url, timeout=5, headers={"User-Agent": "INTERCEPT-ADS-B/1.0"})
resp = requests.get(
url, timeout=5, headers={"User-Agent": "INTERCEPT-ADS-B/2.27 (+https://github.com/smittix/intercept)"}
)
if resp.status_code == 200:
data = resp.json()