MA

mdowis/anansi

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

118 stars 22 forks 质量 70 趋势 8Apache-2.0

mdowis/anansi 是从 https://github.com/mdowis/anansi. 导入的 MCP 服务器候选

概览

mdowis/anansi 是从 https://github.com/mdowis/anansi. 导入的 MCP 服务器候选

概述(AI 翻译)

那会学习的蜘蛛。

一个针对敌对网站的自我修复网页爬虫——而且任何大型语言模型都能驱动。

每台抓土机都能开始工作。问题是它多久会断裂。阿南西是建立在 不同的假设是:网络是对抗性的且不稳定的,你的抓取器应该能处理这些 没有你的参与。

当网站更改布局时,Anansi 仍然会找到数据并记住修复方法。当 页面需要浏览器来渲染,它会悄无声息地切换到浏览器。当机器人检测进入时 它呈现了一个连贯的身份——匹配的TLS指纹、人物和头—— 它的作用是通过检测而非触发检测。重新爬取时,未更改的页面是 甚至在请求出现之前就被跳过了。结果是一个经得起重新设计的爬虫,手柄 敌对网站,运行时间越长越好。

自带一个MCP服务器,所以任何大型语言模型都能通过对话进行完整爬行。


精彩片段

  • 自我修复的选择者 — CSS选择者带有信心分数;当其中一人崩溃时,四种治疗策略竞争,获胜者得以保留。其运作方式→

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

The spider that learns.

A self-healing web scraper for hostile sites — and it’s driveable by any LLM.

Every scraper starts working. The question is how long before it breaks. Anansi is built on a different assumption: the web is adversarial and unstable, and your scraper should handle that without your involvement.

When a site changes its layout, Anansi finds the data anyway and remembers the fix. When a page needs a browser to render, it switches to one silently. When bot detection gets in the way, it presents a coherent identity — matched TLS fingerprint, persona, and headers — that works to slip past detection instead of tripping it. And when you re-crawl, unchanged pages are skipped before a request is even made. The result is a crawler that survives redesigns, handles hostile sites, and gets better the longer it runs.

Ships with an MCP server so any LLM can drive a full crawl through conversation.


Highlights

  • Selectors that repair themselves — CSS selectors carry confidence scores; when one breaks, four healing strategies compete and the winner is persisted. How it works →
  • A browser only when you need one — every response is checked for JS shells and silently retried in a stealth Playwright browser, cached per domain. How it works →
  • A coherent anti-bot identity — matched TLS/HTTP-2 fingerprint, persona, and headers, with vendor-aware handling of Cloudflare, Akamai, and DataDome, plus an opt-in Patchright engine for CDP-level stealth. Anti-bot & identity →
  • Re-crawls that skip the unchanged — ETag, Last-Modified, content hashing, and sitemap `` filtering skip pages before the request goes out. Capabilities →
  • Data you can trust — attach a Pydantic item_schema and every scraped item is validated and coerced before it hits your database. Getting started →
  • Driveable by any LLM — a FastMCP server exposes 17 tools so an agent can fetch, extract, crawl, and screenshot through conversation. MCP server →

See the full capability reference for everything else — proxy rotation, adaptive rate limiting, URL canonicalization, JS interaction, network capture, and more.


Install

# Core install
pip install "git+https://github.com/mdowis/anansi"

# For browser-based fetching (Cloudflare bypass, JS rendering):
playwright install chromium
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →