From d68d1ec53ae85daacd44308e34a281582d9fd405 Mon Sep 17 00:00:00 2001 From: James Smith Date: Thu, 21 May 2026 21:34:42 +0100 Subject: [PATCH] fix(adsb): update Planespotters User-Agent to include contact URL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- routes/adsb.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/routes/adsb.py b/routes/adsb.py index 3e078b1..64c3123 100644 --- a/routes/adsb.py +++ b/routes/adsb.py @@ -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()