feat: continuous news scrape + 15-min analyst, expand urls.txt

Scraper loops with NEWS_SCRAPE_INTERVAL_S (default 10s after each
crawl). Summarizer runs every NEWS_SUMMARIZE_INTERVAL_S (default 900)
over the last 15 minutes of articles. Feed list replaced from the
k8s scrapy-urls configmap (334 sources).
This commit is contained in:
Sirius DevOps 2026-08-28 20:53:32 -04:00
commit 8643153954
11 changed files with 434 additions and 376 deletions

View file

@ -58,7 +58,7 @@ KEY_REGISTRY: dict[str, dict] = {
"example": "32-char hex string (e.g. 5f3c…9a02)",
},
"NOUS_API_KEY": {
"description": "Nous Portal API key — hourly news summarizer (inference-api.nousresearch.com).",
"description": "Nous Portal API key — 15-min news summarizer (inference-api.nousresearch.com).",
"pattern": r"^.{16,}$",
"example": "key from https://portal.nousresearch.com (API keys page)",
},

View file

@ -1084,7 +1084,7 @@ async def camera_hls_segment(camera_id: UUID, u: str = Query(..., min_length=8))
# ── News pipeline (scraper + summarizer) ──────────────────────────────────
# Backing data for the frontend news panel. Written by the vendored
# news-scraper (hourly Scrapy crawl) and news-summarizer (hourly Gemini
# news-scraper (continuous Scrapy crawl) and news-summarizer (15-min Nous
# map-reduce) services into the shared osint-db.
@app.get("/api/news", response_model=list[NewsArticleOut])

View file

@ -731,7 +731,7 @@
<label class="lp-name"><input type="checkbox" id="lp-news-on" checked onchange="toggleNewsPins()"> <span class="lp-dot news"></span> Critical News</label>
<span class="lp-count" id="lp-news-count">0</span>
</div>
<div class="lp-note">LLM-estimated locations from the hourly brief. Pins only for critical/high.</div>
<div class="lp-note">LLM-estimated locations from the 15-min brief. Pins only for critical/high.</div>
</div>
<div class="lp-layer">
@ -828,7 +828,7 @@
<section class="view" id="view-news" aria-label="News brief">
<div class="subview">
<h2><span class="tick">◉</span> Global News Brief</h2>
<p class="sub">Scraped on the 15-minute cycle · latest LLM executive summary pinned above</p>
<p class="sub">Scraped continuously · latest LLM executive summary pinned above</p>
<div class="news-head">
<div class="news-refresh">
<span class="news-updated" id="news-updated">—</span>
@ -994,7 +994,7 @@
</div>
<div class="panel">
<h3>News Summarizer</h3>
<p class="set-note" style="margin-bottom:0.9rem">Takes effect on the next hourly run (:05). No container restart.</p>
<p class="set-note" style="margin-bottom:0.9rem">Takes effect on the next 15-min run. No container restart.</p>
<div class="set-row">
<label>Provider</label>
<span>Nous Portal (inference-api.nousresearch.com)</span>
@ -1062,7 +1062,7 @@
<div class="sys-row"><span class="k">Active sources</span><span class="v" id="sys-sources">—</span></div>
<div class="sys-row"><span class="k">Open alerts</span><span class="v" id="sys-alerts">—</span></div>
<div class="sys-row"><span class="k">Tracked entities</span><span class="v" id="sys-entities">—</span></div>
<div class="sys-row"><span class="k">News cycle</span><span class="v">hourly :05</span></div>
<div class="sys-row"><span class="k">News cycle</span><span class="v">analyst 15m · scraper continuous</span></div>
<div class="sys-row"><span class="k">Market feed</span><span class="v" id="sys-market">STANDBY</span></div>
</div>
<div class="set-actions">
@ -1088,7 +1088,7 @@
<div class="tick-wrap">
<div class="tick-track" id="nt-track"></div>
</div>
<div class="tick-tag" id="nt-tag">HOURLY</div>
<div class="tick-tag" id="nt-tag">15 MIN</div>
</div>
</footer>
@ -1385,7 +1385,7 @@ function renderNewsList(articles) {
if (!listEl) return;
document.getElementById('news-count').textContent = articles.length + ' articles';
if (!articles || !articles.length) {
listEl.innerHTML = '<div class="news-empty">No articles scraped yet — the scraper runs hourly at :00. Check news-scraper logs.</div>';
listEl.innerHTML = '<div class="news-empty">No articles scraped yet — the scraper runs continuously. Check news-scraper logs.</div>';
return;
}
listEl.innerHTML = articles.map(a => {