131CDA1/dsh-scrape-webpage

DeepSeek Harness 的网页读取插件

Project Overview项目介绍

This is a DSH-native plugin built exclusively for DeepSeek Harness that adds a scrape_webpage tool to the agent environment. The tool can fetch public webpages, extract core content including page title, meta description, heading hierarchy, outbound links, and main body text. It also runs automatic content analysis, counting characters and words, estimating reading time, detecting language, returning the top 30 high-frequency keywords after filtering stop words, and can download page images for downstream vision analysis, and exposes an extension interface for other vision plugins.

After installation, you just need to restart DSH for the plugin to take effect. Users can trigger the tool simply by asking the DSH agent to scrape a specified URL in chat, and can customize the maximum body character count and the number of images to download. If the target HTTPS page fails to load due to sandbox TLS restrictions, the agent can request one-time elevated permission from the user to retry the request. This tool is designed for users who need DSH to pull and analyze content from live public webpages.

This plugin is released under the open source MIT license, and is a zero-dependency host-only plugin that runs by default within DSH’s sandbox. It enforces hard limits on all fetched content, including maximum body length, number of links, number of images, and timeout lengths for all operations. To install, you need to have pnpm available in your system PATH, and the plugin supports installation from npm, GitHub, or a local directory, with local installs requiring the file: prefix to resolve correctly. The recommended install command from npm is dsh plugin --profile web add dsh-scrape-webpage.

这是一个专为 DeepSeek Harness 开发的原生网页抓取分析插件,提供 scrape_webpage 工具,可抓取目标网页的正文内容,提取网页标题、页面描述、各级标题结构、出站链接列表,自动统计字符数、词数、预计阅读时长、判断语言倾向,还能过滤停用词后输出排名前三十的高频关键词,支持下载网页图片供视觉分析。

安装完成重启 DSH 后即可使用,用户只需在对话中指示模型抓取指定网页即可触发工具,支持自定义正文最大字符数、设置要下载的图片数量。遇到沙箱权限不足的 HTTPS 页面时,可申请用户一次性授权后重试。本工具适合需要让模型获取公开网页内容、整理网页信息、做内容分析的开发和使用场景。

本插件遵循 MIT 开源许可协议,是零依赖的 Host-only 插件,默认在沙箱内执行,对正文长度、链接数量、下载图片数量都设置了明确上限,各类操作的超时时间也做了受控处理。安装需要系统环境的 PATH 中有 pnpm,支持从 npm、GitHub、本地目录等多种方式安装,本地目录安装需要添加 file: 前缀才能正确解析。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 8 stars - very few users, little community feedback星标只有 8,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add dsh-scrape-webpage

把 131CDA1/dsh-scrape-webpage 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-scrape-webpage

网页抓取与分析插件 —— DeepSeek Harness 组合插件(Host-only,零依赖)。

用爬虫读取网站内容并做分析:注册模型工具 scrape_webpage,抓取网页正文,提取标题、页面描述、H1–H6 标题结构、链接列表,统计字符数/词数/预计阅读时长与语言倾向,计算高频关键词(中文二元组 + 英文单词,含停用词过滤);可选下载页面内容图片供视觉分析,并提供 scrape.imageAnalyzer 扩展服务供识图插件接入。

✨ 功能特性

  • 网页抓取:http/https,自动重定向,非 2xx 状态码优雅返回
  • 内容提取:标题、页面描述、正文(截断可调)、H1–H6 标题结构、链接列表(上限 100)
  • 自动分析:字符数、词/字数、标题数、链接数、预计阅读时长、语言倾向(中/英/混合)、高频关键词 Top30
  • 图片下载:提取 <img src/data-src/srcset>(相对路径自动归一化,过滤图标/logo 等噪音),下载到会话工作区 .scrape-images\,返回本地路径供视觉模型 read_image 分析
  • 识图插件接口:发布 scrape.imageAnalyzer 服务,识图插件注册分析器后,图片自动交给分析器并把结果附在工具输出中
  • 安全模型:默认沙箱内抓取;HTTPS 沙箱 TLS 受限时按 pwsh 工具的升级契约,显式 sandbox_permissions + 审批一次性授权
  • bundle 打包:package.json 声明 dsh.bundle.patch,dsh plugin --profile <name> add 安装后自动注册为组合层,无需手动编辑 cordis.patch.yml

📦 安装

本包是 bundle 包(package.json 中 dsh.bundle.patch 指向 cordis.patch.yml)。dsh plugin 安装成功后会自动把它加入 profile 的 dsh.profile.bundles,重启即加载。

前置:dsh plugin 转发给 pnpm,需要 pnpm 在 PATH 上;首次使用会自动初始化目标 profile。

方式 A:从 npm 安装(推荐)

# 通过 dsh plugin 从 npm registry 安装并自动注册到 profile
dsh plugin --profile web add dsh-scrape-webpage

如果自行管理 profile 的 node_modules,也可以在对应目录中直接使用 npm 安装:

npm install dsh-scrape-webpage

方式 B:从 GitHub 或本地目录安装

# 直接从 GitHub 安装
dsh plugin --profile web add "github:131CDA1/dsh-scrape-webpage"

# 本地目录调试(注意:必须显式 file: 前缀)
dsh plugin --profile web add "file:D:\path\to\dsh-scrape-webpage"

重启 DSH 后生效。卸载:dsh plugin --profile web remove dsh-scrape-webpage。

⚠️ 本地目录请用 file: 前缀。裸路径 / 相对路径会被 pnpm 当作 link: 协议, 在 hoisted 布局下不会物化到 node_modules 顶层,导致启动时无法解析该包。

方式 C:手动复制(离线兜底)

git clone https://github.com/131CDA1/dsh-scrape-webpage.git
Copy-Item -Recurse .\dsh-scrape-webpage "$env:DSH_HOME\profiles\web\node_modules\dsh-scrape-webpage"

再把 cordis.patch.yml 中的 insert 行合并进该 profile 的 cordis.patch.yml:

- insert:
    - id: scrape-webpage
      name: dsh-scrape-webpage

重启 DSH 生效。

🚀 使用

对话中直接说:"帮我抓取 https://example.com 并分析"。工具参数:

参数 类型 说明
url string(必填) 要抓取的网页地址(http/https)
maxChars number 返回正文最大字符数,默认 30000,范围 1000–100000
images number 同时下载内容图片数(上限 6,默认 0),图片保存到 .scrape-images\<时间戳>\,返回本地路径供 read_image 查看
sandbox_permissions string 仅 danger-full-access。HTTPS 沙箱受限报错提示 escalation available 后,重试同一次抓取时携带;审批弹窗由用户决定
justification string 与 sandbox_permissions 配套:一句话说明为何需要更宽权限

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-server-deck 下一个 Next dsh-plugin-chart →