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:
co-authored by
Claude Opus 5.5
parent
aa5b71d853
commit
af00139079
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user