INNER CODE UNIT · Python

radar

simonlin1212/vibe-astock · vr/app.py:241

def radar():
    """资讯雷达:12 赛道公开 RSS 资讯(读缓存,无缓存返回赛道骨架)。"""
    try:
        return {"data": newsradar.get_radar(force=False)}
    except Exception as e:  # noqa: BLE001
        raise HTTPException(502, f"资讯雷达异常:{e}") from e


@app.post("/api/radar/refresh")
def radar_refresh():
    """强制重抓全部 RSS 源(耗时约 20-40s),更新缓存。"""
    try:
        return {"data": newsradar.fetch_radar()}
    except Exception as e:  # noqa: BLE001
        raise HTTPException(502, f"资讯雷达刷新失败:{e}") from e


@app.get("/api/market/overview")

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…