MCPcopy Index your code
hub / github.com/eggacheb/web-content-extractor

github.com/eggacheb/web-content-extractor @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
6 symbols 18 edges 8 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Web Content Extractor

一个简单高效的网页内容提取工具,专门设计用于AI分析场景。本工具可以清理网页中的广告、导航栏等无关内容,只保留主要文章内容,使AI能够更好地理解和分析文本。

因为本项目无法提取微信公众号文章和知乎文章,所以新开了一个magic-html-api项目一个智能的网页内容提取API服务,基于magic-html和jina-ai/reader。支持多种内容类型(文章/论坛/微信/知乎),多种输出格式(文本/Markdown/HTML)。只保留主要文章内容,使AI能够更好地理解和分析文本。

🌟 特点

  • 🚀 基于Next.js构建的现代Web应用
  • 📝 使用Mozilla的Readability算法提取主要内容
  • 🧹 自动清理多余的HTML标签和格式
  • 🎯 专注于提取对AI分析有价值的内容
  • 💨 快速且轻量级的API

🔗 在线演示

访问 https://web-content-extractor.vercel.app 体验在线版本。

一键部署:Vercel Deployment

image

image

image

🛠️ 技术栈

  • Frontend:
  • Next.js 14
  • React
  • Tailwind CSS
  • TypeScript
  • Lucide Icons

  • Backend:

  • Next.js API Routes
  • Readability.js
  • Puppeteer

🚀 快速开始

  1. 克隆项目
git clone https://github.com/eggacheb/web-content-extractor.git
cd web-content-extractor
  1. 安装依赖
npm install
  1. 启动开发服务器
npm run dev
  1. 打开浏览器访问 http://localhost:3000

📚 API 使用

提取网页内容

GET /api/extract?url=https://example.com

响应示例

{
  "title": "文章标题",
  "content": "文章正文内容...",
  "excerpt": "文章摘要",
  "byline": "作者信息(如果有)"
}

🤝 贡献

欢迎提交 Issue 和 Pull Request!

📄 许可证

MIT License - 查看 LICENSE 文件了解更多信息。

Core symbols most depended-on inside this repo

cleanText
called by 1
app/api/extract/route.ts
Home
called by 0
app/page.tsx
handleExtract
called by 0
app/page.tsx
handleCopy
called by 0
app/page.tsx
RootLayout
called by 0
app/layout.tsx
GET
called by 0
app/api/extract/route.ts

Shape

Function 6

Languages

TypeScript100%

Modules by API surface

app/page.tsx3 symbols
app/api/extract/route.ts2 symbols
app/layout.tsx1 symbols

For agents

$ claude mcp add web-content-extractor \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact