zdddrszj985/dsh-browser-cdp ↗★ 1
dsh-browser-cdp
DSH plugin: open a URL in your local Chromium (Edge/Chrome) over CDP and get the rendered page back — the fallback for pages the built-in fetcher cannot handle.
同名包的其他仓库
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:zdddrszj985/dsh-browser-cdp说明文档
阅读完整 README ↗Usage
Once loaded, the agent can call browser_open:
{
"url": "https://github.com/owner/repo/blob/main/README.md",
"waitForSelector": "article.markdown-body", // optional
"screenshot": true // optional
}
Returns:
{
"url": "https://example.com/", // final URL after redirects
"title": "Example Domain",
"text": "Example Domain\nThis domain is for use ...", // visible innerText
"chars": 129,
"data": "", // value of the evaluate expression
"screenshot": "C:\\Users\\you\\.dsh\\browser-cdp-shots\\shot-1712.png",
"browser": "Edg/157.0.4341.60",
"elapsedMs": 3115
}
Parameters
| Parameter | Type | Default | Meaning |
|---|---|---|---|
url | string | — (required) | Absolute http(s) URL |
waitForSelector | string | — | Wait until this CSS selector matches before extracting |
click | string | — | Click this element after load, then re-settle |
evaluate | string | — | JS expression evaluated in the page; value returned as data |
settleMs | integer | 1200 | Extra wait after load before extracting |
timeoutMs | integer | 30000 | Navigation budget and per-CDP-call budget |
html | boolean | false | Return outerHTML instead of visible text |
screenshot | boolean | false | Save a PNG and return its path |
headful | boolean | false | Show a real window (needed to log in by hand) |
keepOpen | boolean | false | Leave the tab open afterwards |
close | boolean | false | Shut the shared browser instance down |
Configuration
All optional, via environment variables:
| Variable | Default | Meaning |
|---|---|---|
DSH_BROWSER_PATH | auto-detected | Path to msedge.exe / chrome.exe / chromium binary (also accepts BROWSER_PATH) |
DSH_BROWSER_CDP_PORT | 9333 | DevTools port |
DSH_BROWSER_CDP_PROFILE | $DSH_HOME/browser-cdp-profile | Browser user-data dir |
DSH_BROWSER_CDP_SHOTS | $DSH_HOME/browser-cdp-shots | Screenshot output dir |
DSH_HOME | ~/.dsh | Base dir for the two above |
Auto-detection looks at the standard install locations for Edge and Chrome on Windows, macOS, and Linux (including LOCALAPPDATA installs, /snap/bin/chromium, /opt/google/chrome/chrome).
Configuration
All optional, via environment variables:
| Variable | Default | Meaning |
|---|---|---|
DSH_BROWSER_PATH | auto-detected | Path to msedge.exe / chrome.exe / chromium binary (also accepts BROWSER_PATH) |
DSH_BROWSER_CDP_PORT | 9333 | DevTools port |
DSH_BROWSER_CDP_PROFILE | $DSH_HOME/browser-cdp-profile | Browser user-data dir |
DSH_BROWSER_CDP_SHOTS | $DSH_HOME/browser-cdp-shots | Screenshot output dir |
DSH_HOME | ~/.dsh | Base dir for the two above |
Auto-detection looks at the standard install locations for Edge and Chrome on Windows, macOS, and Linux (including LOCALAPPDATA installs, /snap/bin/chromium, /opt/google/chrome/chrome).