D4Vinci/Scrapling

GITHUB中文整理

主语言 Python · 102,337 星 · BSD-3-Clause · 创建于 2024-10-14

网页爬虫Python数据采集AI 代理浏览器自动化
打开 GitHub 仓库

Scrapling 是一个 Python Web 爬虫框架,把快速 HTTP 请求、隐身浏览器、页面解析和并发爬取整合到一个库中。

Stars 102,337 累计 star,越多说明被认可得越广
Watching 328 订阅该仓库变动的人数
Forks 9,757 被派生出去的仓库数
Issues 11 当前开放的 Issue 数
语言 Python GitHub 自动判定的主语言
许可证 BSD-3-Clause 开源协议,用之前先确认能不能商用
24h 增长 +0 1 天前 102,337 星
7 日增长 +0 7 天前 102,337 星
30 日增长 — 数据积累中

仓库健康度

5 个维度
只看客观信号,不构成安全性结论
维护活跃度 数据完整
2026-11-03 02:37 最近推送

最近推送 2026-11-03 02:37(28 天前),属于活跃维护

社区响应 数据完整
11 开放 Issue

开放 Issue 11 个 · Fork 9,757 个

增长趋势 部分数据
+0 7 日新增

24 小时 +0 · 7 日 +0 · 30 日 积累中

项目规范 数据完整
BSD-3-Clause 许可证

许可证 BSD-3-Clause · 12 个 topics · 开了 Wiki

版本发布 证据不足
— 发布次数

这一项暂无数据,不代表项目没有发布

「证据不足」表示这项数据暂时没有取到,不能读成「项目有问题」;「部分数据」表示只拿到一部分信号。版本发布要额外调 Releases 接口,下一版补。

Star 趋势

29 天记录
最近 90 天站内记录的星数
102,337当前 Star +8,711首尾差值 2026-11-03最早记录 2026-12-01最近记录

横轴 2026-11-03 → 2026-12-01,纵轴按这段时间的最小/最大值拉伸。趋势来自站内每天记录一次的星数,页面打开时不会实时请求 GitHub。

它解决什么问题

据 README 归纳
没有它会怎样

做网页采集时,通常要分别拼装请求库、浏览器自动化、解析器和爬虫调度,还要自己处理反爬、会话复用、代理轮换和重试。缺少统一方案时,从单页抓取扩展到整站爬取会非常零散且容易出错。

核心能力

7 条
归纳自 README,不是功能列表照抄
  1. 1用 Python 发起快速 HTTP 请求,可模拟浏览器 TLS 指纹并携带隐身请求头
  2. 2驱动隐身浏览器渲染 JavaScript 并执行页面交互
  3. 3用 CSS 等选择器解析页面并提取结构化数据
  4. 4通过可复用会话管理登录状态、代理轮换和自动重试
  5. 5构建并发爬虫,支持暂停与恢复以及数据导出
  6. 6通过 MCP 服务器和 Agent Skill 让 AI 代理直接调用爬取能力
  7. 7把页面或整站转换为适合大模型使用的 Markdown 语料

项目画像

6 个角度
决定要不要用之前,先看这六条

项目定位

Scrapling 是一个 Python Web 爬虫框架,把快速 HTTP 请求、隐身浏览器、页面解析和并发爬取整合到一个库中。

适合谁

适合需要采集网页数据的 Python 开发者、爬虫工程师,以及希望让 AI 代理直接执行网页抓取和数据提取的团队。

典型场景

抓取静态网页中的引文、标题等字段并保存为 JSON 文件;对需要 JavaScript 渲染或登录态的网站进行浏览器抓取和交互操作;把整站内容爬取为干净 Markdown,供检索增强生成使用;让 Claude、Cursor 等 AI 代理通过 MCP 执行网页请求、截图和后台 API 响应采集

部署难度

基础使用只需 pip 安装后即可发起 HTTP 请求;使用浏览器抓取或扩展功能时,还需运行安装命令下载浏览器及相关依赖,步骤略多。

风险限制

HTTP 请求无需浏览器;使用浏览器抓取器或部分扩展功能时,需另行安装浏览器及其系统依赖。安装细节可参考官方安装指引。

最近维护

最近一次推送是 2026-11-03 02:37。 实现方式:以 FetcherSession 等会话对象统一管理请求,可同步或异步调用;需要渲染时切换到浏览器抓取器。页面对象暴露选择器接口提取数据,爬虫模板负责并发调度和结果导出。

README 原文细节

6 个板块
项目自己写的功能与用法,原文照录

核心功能README 里列出来的能力清单

AI Features

  • 🤖 MCP Server: Let AI chatbots and agents (Claude/Cursor/etc) scrape through Scrapling with HTTP requests, browser actions, screenshots, saved login state, and background API responses. Uses our stealt
  • 🧠 Agent Skill: A ready-to-install Agent Skill that teaches coding agents the whole library, so the code they write with Scrapling matches the current API instead of guessing.
  • 📚 RAG-ready Markdown: Turn any page into clean, sanitized, LLM-ready Markdown with one line (page.markdown()), or crawl a whole website into a Markdown corpus with the ContentSpider template, all with

怎么安装从零跑起来的步骤

Getting Started

Let's give you a quick glimpse of what Scrapling can do without deep diving.

Installation

pip install scrapling

怎么用最典型的用法与示例

Basic Usage

from scrapling.fetchers import Fetcher, FetcherSession

with FetcherSession(impersonate='chrome') as session:  # Use latest version of Chrome's TLS fingerprint
    page = session.get('https://quotes.toscrape.com/', stealthy_headers=True)
    quotes = page.css('.quote .text::text').getall()

# Or use one-off requests
page = Fetcher.get('https://quotes.toscrape.com/')
quotes = page.css('.quote .text::text').getall()

Async Session Management Examples

import asyncio
from scrapling.fetchers import FetcherSession, AsyncStealthySession

async def main():
    async with FetcherSession(http3=True) as http_session:  # `FetcherSession` is context-aware and can work in both sync/async patterns
        page1 = await http_session.get('https://quotes.toscrape.com/')
        page2 = await http_session.get('https://quotes.toscrape.com/page/2/', impersonate='chrome')
        print(len(page1.css('.quote')), len(page2.css('.quote')))

    async with AsyncSte

环境与依赖跑它之前要准备什么

Optional Dependencies

This downloads all browsers, along with their system dependencies and fingerprint manipulation dependencies.

Or you can install them from the code instead of running a command like this:

Run scrapling install when you need browser fetchers. HTTP requests do not need a browser installation.

  • If you are going to use any of the extra features below, the fetchers, or their classes, you will need to install fetchers' dependencies and their browser dependencies as follows:
  • Extra features:
  • Install the MCP server feature:
  • Install dependencies for (building RAG systems):
  • Install shell features (Web Scraping shell and the extract command):
  • Install everything:

实现原理它内部是怎么做的

High-Performance & battle-tested Architecture

  • 🚀 Lightning Fast: Optimized performance outperforming most Python scraping libraries.
  • 🔋 Memory Efficient: Optimized data structures and lazy loading for a minimal memory footprint.
  • ⚡ Fast JSON Serialization: 10x faster than the standard library.
  • 🏗️ Battle tested: Not only does Scrapling have 92% test coverage and full type hints coverage, but it has been used daily by hundreds of Web Scrapers over the past year.

其它说明README 里剩下的内容

What you can do with Scrapling

This prints 10 and saves the quotes and authors to quotes.json.

  • Fetch & interact: Fast HTTP requests, stealth browsers, JavaScript rendering, Cloudflare Turnstile/Interstitial handling, persistent sessions, and background API capture.
  • Parse & extract: CSS, XPath, text and regex search, adaptive element tracking, similar-element matching, and clean Markdown output.
  • Crawl & export: Concurrent spiders, proxy rotation, retries, AutoThrottle, pause/resume, streaming, ready-made templates, and JSON/JSONL/CSV/XML exports.
  • Scrape with AI or from your terminal: An MCP server for AI agents to browse and extract data, an Agent Skill, CLI commands, and an interactive shell.

概述

Selection methods · Fetchers · Spiders · Proxy Rotation · CLI · MCP

Scrapling is a Python Web Scraping framework that brings fast HTTP requests, stealth browsers, powerful parsing, and concurrent crawling into one library.

Scrape static pages, render JavaScript, interact with websites, and extract data from the API calls behind them. Build crawlers with reusable sessions, proxy rotation, automatic retries, pause/resume, and built-in data exports.

Use it from Python, the terminal, or your AI agent through its MCP server and Agent Skill. From extracting a few fields to collecting a whole website as clean Markdown, Scrapling covers the full scraping workflow.

关于 Scrapling 的常见问题

7 个问题
答案来自 README 归纳与 GitHub 实时数据
Scrapling 是做什么的?

Scrapling 是一个 Python Web 爬虫框架,把快速 HTTP 请求、隐身浏览器、页面解析和并发爬取整合到一个库中。 做网页采集时,通常要分别拼装请求库、浏览器自动化、解析器和爬虫调度,还要自己处理反爬、会话复用、代理轮换和重试。缺少统一方案时,从单页抓取扩展到整站爬取会非常零散且容易出错。

Scrapling 有哪些功能?

核心能力:用 Python 发起快速 HTTP 请求,可模拟浏览器 TLS 指纹并携带隐身请求头;驱动隐身浏览器渲染 JavaScript 并执行页面交互;用 CSS 等选择器解析页面并提取结构化数据;通过可复用会话管理登录状态、代理轮换和自动重试;构建并发爬虫,支持暂停与恢复以及数据导出;通过 MCP 服务器和 Agent Skill 让 AI 代理直接调用爬取能力;把页面或整站转换为适合大模型使用的 Markdown 语料。

Scrapling 适合谁用?

适合需要采集网页数据的 Python 开发者、爬虫工程师,以及希望让 AI 代理直接执行网页抓取和数据提取的团队。

Scrapling 是怎么工作的?

以 FetcherSession 等会话对象统一管理请求,可同步或异步调用;需要渲染时切换到浏览器抓取器。页面对象暴露选择器接口提取数据,爬虫模板负责并发调度和结果导出。

怎么安装 Scrapling?

按项目 README 的说明:Let's give you a quick glimpse of what Scrapling can do without deep diving.。完整命令见下方「怎么安装」一节或 GitHub 仓库的 README。

用 Scrapling 有什么门槛或限制?

HTTP 请求无需浏览器;使用浏览器抓取器或部分扩展功能时,需另行安装浏览器及其系统依赖。安装细节可参考官方安装指引。

Scrapling 现在还在维护吗?数据怎么样?

目前 102,337 星,9,757 个 Fork,主语言 Python,创建于 2024-10-14,最近一次推送 2026-11-03 02:37,许可证 BSD-3-Clause。星数、Fork、推送时间都是 GitHub 返回的实时数据,「最近推送」离现在越近说明越活跃;长期不动要留意是否已停止维护。

这些内容来自哪

读法说明
中文整理据 README 归纳,数据取自 GitHub
中文说明据项目 README 归纳只写 README 能确认的内容,不替作者补功能与数字
关键数据与 GitHub 页面一致星数、Fork、语言与时间都不做二次加工
数据日期2026-11-10 05:10星数与介绍这份数据是哪一天的

项目数据取自 GitHub 官方接口与项目 README;星数、Fork、语言与时间以 GitHub 页面为准,档案更新于 2026-11-10 05:10。