🌐 Web Capture

网页截图 / HTML / 可读文本 提取服务

📦 网址缓存: | 有效期
同网址命中缓存直接返回历史结果,不重复提取;勾选上方「强制刷新」可绕过。
自动 = 优先 Playwright,失败自动回退 agent-browser(推荐)
某些网站需要较长验证过程,可设置为 10000-30000

正在处理,请稍候...

捕获结果

📜 提取历史

时间 类型 调用者 方式 网址 标题 状态 操作

📚 使用说明

重要提示:

API 调用:

POST /api/capture
{
  "url": "https://example.com",
  "action": "smart",          // "screenshot" | "html" | "text" | "smart"
  "wait_time": 15000,         // 重要!验证网站需设置较长等待
  "scroll_times": 3,          // 可选:加载动态内容
  "scroll_delay": 1000,       // 可选:滚动间隔
  "full_page": true,          // 可选:全页截图
  "backend": "auto",           // 可选:auto(默认,优先playwright,失败回退agent-browser) / playwright / agent-browser / chrome-cdp
  "caller": "news-tracker",     // 可选:调用者标识(历史记录里显示,默认游客)
  "call_method": "api",        // 可选:调用方式 web/api(缺省自动判定)
  "viewport": {"width":1280,"height":700},
  // ---- 📦 网址缓存(默认开启,全局配置在 /api/capture/settings)----
  "refresh": false,           // 可选:true=强制实时提取(绕过缓存)
  "cache": true,              // 可选:false=本次请求禁用缓存
  "cache_ttl_seconds": 604800,  // 可选:本次缓存时效(秒, -1=永久),覆盖全局有效期,命中判定也用它
  "smart_config": {           // 可选:临时覆盖按需截图配置(接口列表按顺序=优先级,失败自动降级)
    "endpoints": [
      {"name":"本地Qwen", "base_url":"http://121.40.164.32:18008/v1", "api_key":"xxxx", "model":"unsloth/Qwen3.8-27B-NVFP4", "enabled":true},
      {"name":"Kimi", "base_url":"https://api.siliconflow.cn/v1", "api_key":"sk-xxx", "model":"Pro/moonshotai/Kimi-K2.6", "enabled":true}
    ],
    "max_scrolls": 20,
    "scroll_ratio": 0.85
  }
}
// 缓存命中响应(text/html/smart 为 JSON;screenshot 直接返回历史图片文件):
// {success:true, from_cache:true, history_id:123, cached_at:"2026-09-11 22:49:41", cache_ttl_seconds:3600, ...}

📦 缓存/🔁 重试全局配置(页面「⚙️ 缓存/重试」按钮或以下接口):
GET  /api/capture/settings
POST /api/capture/settings
{
  "settings": {
    "cache": {"enabled": true, "ttl_seconds": 604800},  // enabled=缓存开关, ttl_seconds=有效期(秒, 默认7天=604800, -1=永久有效)
    "retry": {"max_retries": 2, "delay_seconds": 15}    // max_retries=失败重试次数(默认2), delay_seconds=重试间隔(秒, 默认15)
  }
}

GET  /api/smart/config         // 获取智能截图配置(含 endpoints 多接口列表)
POST /api/smart/config         // 保存配置(body: {config:{endpoints:[...], prompt, max_scrolls,...}})
POST /api/smart/test           // 测试指定接口(body: {endpoint_id} 或 {endpoint:{...}} 或旧版 {config:{...}})
GET  /api/history?page=1&page_size=15&action=all&search=关键词   // 历史分页
GET  /api/history/stats?dimension=day&days=30   // 历史统计(dimension: day/action/backend/status/caller/method)
GET  /api/history/<id>         // 历史详情
GET  /api/history/<id>/file     // 历史截图文件
DELETE /api/history/<id>        // 删除历史