cameras: ingest ALERTCalifornia/ALERTWest official public JPEGs
All checks were successful
build-and-deploy / build (push) Successful in 3m36s
All checks were successful
build-and-deploy / build (push) Successful in 3m36s
Adds the documented getCameraDataByLoc API (~10k public wildfire, DOT, and FAA stills with lat/lon). Masscan will not produce viewable feeds; this will. Map bbox fetch raised to 2000 markers.
This commit is contained in:
parent
7ceba736dd
commit
f3c35c2230
4 changed files with 95 additions and 19 deletions
|
|
@ -8,16 +8,16 @@ from __future__ import annotations
|
|||
import os
|
||||
|
||||
# ── Camera scraper ─────────────────────────────────────────────────────────
|
||||
# Comma-separated public directory/list URLs to scrape. Two formats supported:
|
||||
# * Insecam-style HTML directory pages (lat/lon embedded per camera)
|
||||
# * Plain-text lists, one camera per line:
|
||||
# <url>[|<lat>,<lon>|<vendor>|<location_name>]
|
||||
# Comma-separated public directory/list/API URLs to scrape.
|
||||
# Formats: Insecam-style HTML, plain-text URL lists, ALERTWest JSON.
|
||||
# NOTE: docker-compose always defines CAMERA_SOURCE_URLS (empty when no .env),
|
||||
# so os.getenv()'s default would never apply — use `or` semantics instead.
|
||||
_DEFAULT_SOURCE_URL = (
|
||||
_DEFAULT_SOURCE_URL = ",".join((
|
||||
# Publicly published open-camera list (markdown bullets of stream URLs).
|
||||
"https://raw.githubusercontent.com/fury999io/public-ip-cams/main/README.md"
|
||||
)
|
||||
"https://raw.githubusercontent.com/fury999io/public-ip-cams/main/README.md",
|
||||
# ALERTCalifornia / ALERTWest official public JPEG API (wildfire + DOT + FAA).
|
||||
"https://api.cdn.prod.alertwest.com/api/getCameraDataByLoc",
|
||||
))
|
||||
CAMERA_SOURCE_URLS = [
|
||||
u.strip()
|
||||
for u in (os.getenv("CAMERA_SOURCE_URLS") or _DEFAULT_SOURCE_URL).split(",")
|
||||
|
|
@ -31,7 +31,7 @@ CAMERA_SCRAPE_INTERVAL = int(os.getenv("CAMERA_SCRAPE_INTERVAL", "3600"))
|
|||
CAMERA_REQUEST_DELAY = float(os.getenv("CAMERA_REQUEST_DELAY", "2.0"))
|
||||
|
||||
# Max cameras accepted per scrape cycle per source (safety cap).
|
||||
CAMERA_MAX_PER_SOURCE = int(os.getenv("CAMERA_MAX_PER_SOURCE", "5000"))
|
||||
CAMERA_MAX_PER_SOURCE = int(os.getenv("CAMERA_MAX_PER_SOURCE", "20000"))
|
||||
|
||||
# ── Geocoding (Nominatim — free, 1 req/s hard politeness limit) ────────────
|
||||
NOMINATIM_URL = os.getenv("NOMINATIM_URL", "https://nominatim.openstreetmap.org")
|
||||
|
|
|
|||
Loading…
Reference in a new issue