mirror of
https://github.com/smittix/intercept.git
synced 2026-06-08 14:11:54 -07:00
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:
+3
-1
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user