
MarkGrab
io.github.ArkNill由 GitHub 账号 ArkNill 发布v0.1.2更新于 Oct 25, 2026
Universal web content extraction — any URL to LLM-ready markdown. HTML, YouTube, PDF, DOCX.
概览
MarkGrab 是一个本地 Python MCP 服务器,可抓取任意 URL,并把 HTML 页面、YouTube 视频、PDF 和 DOCX 文件转换成适合大模型使用的干净 Markdown。
- 可以做什么
- 抓取 URL 并将内容转换为干净的 Markdown、纯文本或结构化 JSON,同时返回标题、字数、检测到的语言和内容类型。处理 HTML 页面时按内容密度过滤,去除导航、侧栏和广告。提取带时间戳的 YouTube 字幕。从 PDF 中按页面结构提取文本,从 DOCX 中按段落和标题提取文本。对依赖 JavaScript 的页面自动回退到 Playwright 浏览器渲染,可选启用反爬脚本,并支持自定义超时、代理和输出长度限制。
- 适用场景
- 适合需要让助手以整洁 Markdown 而非原始 HTML 阅读网页文章、论文、文档或视频字幕的场景,例如资料研究、摘要生成或把内容送入处理流程。
- 运行要求
- 以 pip 安装的 Python 包形式在本地运行;可选附加组件用于 Playwright 浏览器渲染、YouTube 字幕、PDF 和 DOCX 解析。需要能访问目标 URL 的网络。未声明任何账号、API 密钥或环境变量。
安装
在 SourceWeft 中
- 打开 控制台中的 MarkGrab,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
MarkGrab
[PyPI] [Python] [License] [Tests]
Universal web content extraction — any URL to LLM-ready markdown.
Features
- HTML — BeautifulSoup + content density filtering (removes nav, sidebar, ads)
- YouTube — transcript extraction with timestamps
- PDF — text extraction with page structure
- DOCX — paragraph and heading extraction
- Auto-fallback — tries lightweight httpx first, falls back to Playwright for JS-heavy pages
- Async-first — built on httpx and Playwright async APIs
Install
Optional extras for specific content types:
Usage
Python API
CLI
ExtractResult
How it works
For HTML pages, if the initial httpx fetch yields fewer than 50 words, MarkGrab automatically retries with Playwright to handle JavaScript-rendered content.
Disclaimer
This software is provided for legitimate purposes only. By using MarkGrab, you agree to the following:
-
robots.txt: MarkGrab does not check or enforce
robots.txt. Users are solely responsible for checking and respectingrobots.txtdirectives and the terms of service of any website they access. -
Rate limiting: MarkGrab does not include built-in rate limiting or request throttling. Users must implement their own rate limiting to avoid overloading target servers. Abusive request patterns may violate applicable laws and website terms of service.
-
YouTube transcripts: YouTube transcript extraction relies on the third-party
youtube-transcript-apilibrary, which uses YouTube's internal (unofficial) caption API. This may not comply with YouTube's Terms of Service. Use at your own discretion and risk. -
Stealth mode: The optional
stealth=Truefeature modifies browser fingerprinting signals to reduce bot detection. This feature is intended for legitimate use cases such as testing, research, and accessing content that is publicly available to regular browser users. Users are responsible for ensuring their use complies with applicable laws and the terms of service of target websites. -
Legal compliance: Users are responsible for ensuring that their use of MarkGrab complies with all applicable laws, including but not limited to the Computer Fraud and Abuse Act (CFAA), the Digital Millennium Copyright Act (DMCA), GDPR, and equivalent legislation in their jurisdiction.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND. See the LICENSE file for the full MIT license text.
Acknowledgments
MarkGrab builds on excellent open-source work and well-established techniques:
- puppeteer-extra-plugin-stealth — stealth evasion patterns (webdriver removal, plugin mocking, WebGL spoofing) that inspired the opt-in
anti_bot/stealth.pymodule - Mozilla Readability — content area detection priority (
article > main > body) and link density filtering concepts used in the density filter - Boilerpipe (Kohlschutter et al., 2010) — the academic origin of link density ratio algorithms for boilerplate removal
- Jina Reader — validated the market need for URL-to-markdown extraction; MarkGrab aims to be a lightweight, self-hosted alternative
Built with httpx, BeautifulSoup, markdownify, Playwright, youtube-transcript-api, pdfplumber, and python-docx.
Used in
- newswatch — RSS news monitoring pipeline (feedkit → markgrab → embgrep → diffgrab)
- watchdeck — Web page monitoring with visual diffs and safety guards
License
Part of the QuartzUnit ecosystem — composable Python libraries for data collection, extraction, search, and AI agent safety.
来源:README.md,提交 9a7a9be
工具
0版本历史
1- v0.1.2最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分
