Khorsheed/dsh-plugins--packages-capture ↗★ 0
@khorsheed/dsh-capture
Rendered fetch (capture) host service: one Remote verb renders a URL in a managed headless Chrome and returns the serialized rendered page with CSSOM styles inlined, so static extractors can read JS-heavy pages 适合需要抓取和阅读依赖JavaScript渲染的复杂网页的用户。
インストール
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Khorsheed/dsh-plugins#548eeabe331c121621b2d08deab4278ad81d6312&path:packages/captureドキュメント
README 全文を読む ↗配置
cordis.yml 行 config(全部可选):
| 键 | 默认 | 说明 |
|---|---|---|
stateRoot | $DSH_HOME/state/dsh-capture | 状态目录(浏览器二进制 + 临时 profile + state.json) |
executablePath | — | 显式 Chrome/Chromium 可执行文件(跳过受管下载) |
channel | — | 系统渠道(如 chrome),由 puppeteer 自行解析 |
chromeBuildId | stable | 受管下载的 Chrome for Testing 构建标记 |
defaultTimeoutMs | 30000 | 默认导航超时(调用方 timeoutMs 钳在 1s–120s) |
maxChars | 8000000 | 序列化输出上限(字符) |
idleTimeoutMs | 60000 | 空闲多久后关掉受管浏览器 |
maxQueue | 4 | 等待线长度(在飞的不算) |
dwellMs | 500 | 遍扫每步停留(IntersectionObserver 需要 ≥ ~400ms) |
maxSweepMs | 20000 | 遍扫总预算 |
snapshotWidgets | true | 序列化前把 JS 驱动的 widget figure 截成静态图 |
maxSnapshots | 40 | 单次渲染最多截多少张 widget(按文档序,其余保留 DOM) |
extraArgs | [] | 追加 Chrome 命令行参数(部署逃生口) |