Spaces:
Sleeping
Sleeping
Fix news metric extraction - use 'results' field
Browse files🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- mcp_client.py +2 -1
mcp_client.py
CHANGED
|
@@ -367,7 +367,8 @@ async def _extract_and_emit_metrics(
|
|
| 367 |
await emit_metric(progress_callback, source, "EV/EBITDA", ev_ebitda)
|
| 368 |
|
| 369 |
elif source == "news":
|
| 370 |
-
|
|
|
|
| 371 |
if articles and isinstance(articles, list) and len(articles) > 0:
|
| 372 |
await emit_metric(progress_callback, source, "articles_found", len(articles))
|
| 373 |
else:
|
|
|
|
| 367 |
await emit_metric(progress_callback, source, "EV/EBITDA", ev_ebitda)
|
| 368 |
|
| 369 |
elif source == "news":
|
| 370 |
+
# News MCP server returns "results" not "articles"
|
| 371 |
+
articles = result.get("results") or result.get("articles") or []
|
| 372 |
if articles and isinstance(articles, list) and len(articles) > 0:
|
| 373 |
await emit_metric(progress_callback, source, "articles_found", len(articles))
|
| 374 |
else:
|