使用说明
Webustler
MCP server for web scraping that actually works.
Extracts clean, LLM-ready markdown from any URL — even Cloudflare-protected sites.
Why Webustler? • Features • Installation • Usage • Output
🤔 为什么选择Webustler?
大多数抓取工具在受保护的站点上都会失败。 Webustler没有。
❌ 其他工具
|
✅ Webustler
|
📊 比较
| 功能 | Webustler | Firecrawl | ScrapeGraphaAI | Crawl4AI | 深度抓取 |
|---|---|---|---|---|---|
| 反机器人旁路 | ✅ | ⚠️ | ❌ | ⚠️ | ❌ |
| Cloudflare支持 | ✅ | ⚠️ | ❌ | ⚠️ | ❌ |
| 不需要API密钥 | ✅ | ❌ | ❌ | ✅ | ⚠️ |
| 自托管 | ✅ | ✅ | ✅ | ✅ | ✅ |
| MCP本地 | ✅ | ✅ | ✅ | ✅ | ❌ |
| 令牌优化 | ✅ | ✅ | ❌ | ✅ | ✅ |
| 丰富的元数据 | ✅ | ✅ | ⚠️ | ⚠️ | ✅ |
| 链接分类 | ✅ | ❌ | ❌ | ❌ | ✅ |
| 文件检测 | ✅ | ⚠️ | ❌ | ❌ | ❌ |
| 阅读时间 | ✅ | ❌ | ❌ | ❌ | ❌ |
| 零配置 | ✅ | ❌ | ❌ | ❌ | ❌ |
| 永远自由 | ✅ | ❌ | ❌ | ✅ | ✅ |
✅ Full support · ⚠️ Partial/Limited · ❌ Not supported
✨ 特性
🛡️ 智能回退系统主要方法失败?自动重试反机器人绕过。无需人工干预。 📋 丰富元数据提取
🔗 链接分类将内部链接(同一域)与外部链接分开。非常适合爬行工作流程。 📁 文件下载检测检测PDF、图像、存档和其他文件类型。返回结构化信息,而不是乱码二进制。 |
🧹 令牌优化输出删除广告、侧边栏、弹出窗口、base64图像、cookie横幅和所有LLM不需要的垃圾。 📊 表保存数据表在markdown中保持不变。不再有破损的布局。 ⏱️ 内容分析自动计算字数和阅读时间。一目了然地了解你的内容。 |
📦 安装
git clone https://github.com/drruin/webustler.git
cd webustler
docker build -t webustler .
🔧 MCP配置
克劳德桌面版
添加到您的 claude_desktop_config.json:
{
"mcpServers": {
"webustler": {
"command": "docker",
"args": ["run", "-i", "--rm", "webustler"]
}
}
}
克劳德代码
claude mcp add webustler -- docker run -i --rm webustler
光标
添加到光标MCP设置中:
{
"mcpServers": {
"webustler": {
"command": "docker",
"args": ["run", "-i", "--rm", "webustler"]
}
}
}
帆板运动
添加到您的Windsurf MCP配置中:
{
"mcpServers": {
"webustler": {
"command": "docker",
"args": ["run", "-i", "--rm", "webustler"]
}
}
}
具有自定义超时
通过 TIMEOUT 环境变量(秒):
{
"mcpServers": {
"webustler": {
"command": "docker",
"args": ["run", "-i", "--rm", "-e", "TIMEOUT=180", "webustler"]
}
}
}
🚀 用法
配置后 scrape 您的MCP客户端可以使用该工具:
Scrape https://example.com and summarize the content
Extract all links from https://news.ycombinator.com
Get the article from https://protected-site.com/article
Webustler自动处理一切,包括Cloudflare挑战。
📄 输出格式
使用YAML frontmatter返回干净的markdown:
---
sourceURL: https://example.com/article
statusCode: 200
title: Article Title
description: Meta description here
author: John Doe
language: en
wordCount: 1542
readingTime: 8 mins
publishedTime: 2025-01-01
openGraph:
title: OG Title
image: https://example.com/og.png
twitter:
card: summary_large_image
internalLinksCount: 42
externalLinksCount: 15
imagesCount: 8
---
# Article Title
Clean markdown content here with **formatting** preserved...
| Column 1 | Column 2 |
|----------|----------|
| Tables | Work too |
---
## Internal Links
- https://example.com/page1
- https://example.com/page2
---
## External Links
- https://other-site.com/reference
---
## Images
- https://example.com/image1.jpg
⚙️ 运作原理
┌─────────────────────────────────────────────────────────────────┐
│ │
│ URL ──► Primary Fetch ──► Blocked? ──► Fallback Fetch │
│ │ │ │
│ ▼ ▼ │
│ Success ◄──────────┘ │
│ │ │
│ ▼ │
│ Clean HTML │
│ │ │
│ ▼ │
│ ┌───────────────────┼───────────────────┐ │
│ ▼ ▼ ▼ │
│ Metadata Markdown Links │
│ │ │ │ │
│ └───────────────────┼───────────────────┘ │
│ ▼ │
│ Format Output │
│ │
└─────────────────────────────────────────────────────────────────┘
🔄 重试逻辑
| 方法 | 尝试 | 延迟 | 目的 |
|---|---|---|---|
| 初级 | 2 | 5s | 快速提取 |
| 回退 | 3 | 5s | 反机器人旁路 |
总计:失败前最多可尝试5次。处理超时、速率限制和挑战。
🧹 内容物清理
Click to see what gets removed
标签已删除
| 类别 | 元素 |
|---|---|
| 脚本 | <script>, <noscript> |
| 样式 | <style> |
| 导航 | <nav>, <header>, <footer>, <aside> |
| 互动 | <form>, <button>, <input>, <select>, <textarea> |
| 媒体中心 | <svg>, <canvas>, <video>, <audio>, <iframe>, <object>, <embed> |
选择器已删除
- 侧边栏(
[class*='sidebar'],[id*='sidebar']) - 评论(
[class*='comment']) - 广告(
[class*='ad-'],[class*='advertisement']) - 社会(
[class*='social'],[class*='share']) - 弹出窗口(
[class*='popup'],[class*='modal']) - Cookie横幅(
[class*='cookie']) - 新闻通讯(
[class*='newsletter']) - 促销活动(
[class*='banner'],[class*='promo'])
也已删除
- Base64内联映像(节省大量代币)
- 空元素
- 换行次数过多(最多连续3次)
🔧 配置
| 变量 | 默认值 | 描述 |
|---|---|---|
TIMEOUT |
120 |
请求超时(秒) |
🏆 为什么不只是使用。..
Firecrawl?
Firecrawl非常出色,但:
- 需要API密钥和付费计划,以便认真使用
- 有限的反机器人功能
- 使用环境变量进行更复杂的设置
ScrapeGraphAI?
ScrapeGraphAI使用LLM来解析页面:
- 所有操作都需要LLM API密钥(OpenAI等)
- 增加延迟(LLM调用)和成本(令牌使用)
- Webustler是确定性的——更快、更便宜、可预测
Crawl4AI?
Crawl4AI是一个强大的开源爬虫,但:
- 需要更多配置才能开始
- LLM功能需要额外的API密钥
- Webustler使用零配置即可开箱即用
Deepcrawl?
Deepcrawl是一个很好的Firecrawl替代品,但是:
- 托管API需要API密钥(自托管是免费的)
- 无反机器人绕过功能
- 仅限REST API,而非MCP服务器
📁 项目结构
webustler/
├── server.py # MCP server
├── Dockerfile # Docker image
├── requirements.txt # Dependencies
├── LICENSE # MIT License
├── images/ # Assets
│ └── image.png
└── README.md # Documentation
⚖️ 道德使用和免责声明
Webustler 作为安全研究、数据互操作性和教育目的的工具提供。
- 职责: 作为Webustler的开发者,我不容忍未经授权的抓取或违反任何网站的服务条款(TOS)。
- 顺从: 用户全权负责确保其使用此工具符合当地法律(如CFAA或GDPR)和内容所有者的知识产权。
- 尊重机器人.txt: 我鼓励所有用户尊重
robots.txt文件并实现合理的爬网延迟,以避免给web服务器带来过度的压力。
这个项目是对网络技术和挑战响应机制的探索。负责任地使用它。
📜 许可证
MIT许可证——随意使用。
MCP server for LLMs. Works everywhere. No API keys. No limits.
Made with care for the AI community