WIP: list credits for all serving providers; pin 511NY imagery to https

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Logan Cusano
2026-10-04 17:56:09 -04:00
co-authored by Claude Opus 5.5
parent aa5b71d853
commit af00139079
3 changed files with 20 additions and 9 deletions
+5 -1
View File
@@ -62,9 +62,13 @@ class Ny511Provider(CameraProvider):
async def fetch_catalog(self) -> List[Camera]:
rows = await ny511._fetch("getcameras", ny511.normalize_camera)
# Hosts for the 511x imagery are unverified, so pin the scheme at least:
# only https URLs reach the browser.
def https(u):
return u if isinstance(u, str) and u.startswith("https://") else None
out = [
make_camera("ny511", r["id"], r["lat"], r["lon"], name=r["name"], roadway=r["roadway"],
direction=r["direction"], image_url=r["image_url"], video_url=r["video_url"])
direction=r["direction"], image_url=https(r["image_url"]), video_url=https(r["video_url"]))
for r in rows
]
return require_parsed(len(rows), out, "511NY")