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渲染的复杂网页的用户。

Package
@khorsheed/dsh-capture
Compatibility
Unverified
Harness peer range
^0.1.0-rc.6
Cordis peer range
^4.0.1
Version
0.1.1
License
MIT
Last updated
Sep 28, 2026

Install

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Khorsheed/dsh-plugins#548eeabe331c121621b2d08deab4278ad81d6312&path:packages/capture

配置

cordis.yml 行 config(全部可选):

键默认说明
stateRoot$DSH_HOME/state/dsh-capture状态目录(浏览器二进制 + 临时 profile + state.json)
executablePath—显式 Chrome/Chromium 可执行文件(跳过受管下载)
channel—系统渠道(如 chrome),由 puppeteer 自行解析
chromeBuildIdstable受管下载的 Chrome for Testing 构建标记
defaultTimeoutMs30000默认导航超时(调用方 timeoutMs 钳在 1s–120s)
maxChars8000000序列化输出上限(字符)
idleTimeoutMs60000空闲多久后关掉受管浏览器
maxQueue4等待线长度(在飞的不算)
dwellMs500遍扫每步停留(IntersectionObserver 需要 ≥ ~400ms)
maxSweepMs20000遍扫总预算
snapshotWidgetstrue序列化前把 JS 驱动的 widget figure 截成静态图
maxSnapshots40单次渲染最多截多少张 widget(按文档序,其余保留 DOM)
extraArgs[]追加 Chrome 命令行参数(部署逃生口)