ワンクリックで
scrapling
使用 Scrapling 进行高级网页抓取,支持反爬绕过(Cloudflare Turnstile)、隐身浏览、自适应解析、Spider 爬虫框架。适用于被反爬保护的网站、动态内容抓取、批量数据提取等场景。
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
使用 Scrapling 进行高级网页抓取,支持反爬绕过(Cloudflare Turnstile)、隐身浏览、自适应解析、Spider 爬虫框架。适用于被反爬保护的网站、动态内容抓取、批量数据提取等场景。
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Compatibility alias for the canonical code-reviewer skill. Use only when older prompts or users explicitly reference code-review-skill; otherwise prefer Agent-Skills/code-reviewer/SKILL.md for code reviews, PR reviews, diffs, staged or unstaged changes, and systematic analysis of correctness, security, performance, maintainability, and tests.
Professional code review workflow for local changes, pull requests, diffs, or pasted code. Use when asked to review code, check PRs, inspect staged or unstaged changes, assess correctness, security, performance, maintainability, tests, or produce actionable findings with severity and file or line references.
所有联网操作必须通过此 skill 处理,包括:搜索、网页抓取、登录后操作、网络交互等。触发场景:用户要求搜索信息、查看网页内容、访问需要登录的网站、操作网页界面、抓取社交媒体内容(小红书、微博、推特等)、读取动态渲染页面、以及任何需要真实浏览器环境的网络任务。
中文时政地缘政治深度分析写作技能。用于撰写去AI味的、具有杂志长文风格的深度时政分析文章。涵盖去AI化规则、长段叙述规范、分析推理要求和数据引用标准。适用于中东局势、大国博弈、战争分析、国际关系等题材。
Generate code architecture diagrams from source code. Use when asked to "generate a diagram", "visualize code architecture", "create a class diagram", "draw a sequence diagram", or when converting code into visual Mermaid/PlantUML diagrams.
Generate comprehensive documentation from code. Use when asked to "generate docs", "document this code", "create API docs", or when automatically producing documentation from source code including JSDoc, TypeDoc, Rustdoc, and general markdown documentation.
| name | scrapling |
| description | 使用 Scrapling 进行高级网页抓取,支持反爬绕过(Cloudflare Turnstile)、隐身浏览、自适应解析、Spider 爬虫框架。适用于被反爬保护的网站、动态内容抓取、批量数据提取等场景。 |
| version | 1.0.0 |
基于 Scrapling 框架的高级网页抓取技能。
最快速,适用于无反爬保护的静态页面:
from scrapling.fetchers import Fetcher
page = Fetcher.get('https://example.com/', stealthy_headers=True)
title = page.css('title::text').get()
content = page.css('article').get()
绕过 Cloudflare Turnstile/Interstitial,指纹欺骗:
from scrapling.fetchers import StealthyFetcher
page = StealthyFetcher.fetch(
'https://protected-site.com/',
headless=True,
google_search=False
)
data = page.css('.content').getall()
完整浏览器自动化,支持 Playwright:
from scrapling.fetchers import DynamicFetcher
page = DynamicFetcher.fetch(
'https://spa-app.com/',
headless=True,
network_idle=True
)
data = page.xpath('//div[@class="item"]/text()').getall()
保持 Cookie 和状态,适合需要登录或多步操作:
from scrapling.fetchers import FetcherSession, StealthySession
# 快速会话
with FetcherSession(impersonate='chrome') as session:
page1 = session.get('https://example.com/login')
page2 = session.get('https://example.com/dashboard')
# 隐身会话
with StealthySession(headless=True, solve_cloudflare=True) as session:
page = session.fetch('https://protected.com/')
批量并发爬取:
from scrapling.spiders import Spider, Request, Response
class MySpider(Spider):
name = "my_spider"
start_urls = ["https://example.com/"]
concurrent_requests = 10
async def parse(self, response: Response):
for item in response.css('.item'):
yield {
"title": item.css('h2::text').get(),
"link": item.css('a::attr(href)').get(),
}
next_page = response.css('.next a')
if next_page:
yield response.follow(next_page[0].attrib['href'])
result = MySpider().start()
result.items.to_json("output.json")
page.css('.class::text')page.xpath('//div/text()')page.find_by_text('搜索文本')element.find_similar()# 基础安装(仅解析器)
pip install scrapling
# 安装 fetcher 依赖(包含浏览器)
pip install "scrapling[fetchers]"
scrapling install
# 安装 AI/MCP 支持
pip install "scrapling[ai]"
# 安装全部功能
pip install "scrapling[all]"
scrapling install
本 skill 包含 scrapling_fetch.py 辅助脚本:
# 快速抓取
python scrapling_fetch.py --url "https://example.com"
# 隐身模式
python scrapling_fetch.py --url "https://protected.com" --mode stealthy
# 动态渲染
python scrapling_fetch.py --url "https://spa.com" --mode dynamic
# 指定选择器提取
python scrapling_fetch.py --url "https://example.com" --selector "article h1"
# 输出为 JSON
python scrapling_fetch.py --url "https://example.com" --format json --output result.json
# 批量抓取
python scrapling_fetch.py --urls urls.txt --output results.json
| 参数 | 说明 | 默认值 |
|---|---|---|
| --url | 目标 URL | 必填 |
| --urls | URL 列表文件 | - |
| --mode | 抓取模式 (fast/stealthy/dynamic) | fast |
| --selector | CSS 选择器 | 自动检测 |
| --xpath | XPath 表达式 | - |
| --output | 输出文件路径 | stdout |
| --format | 输出格式 (json/md/text) | md |
| --proxy | 代理地址 | - |
| --wait | 等待时间 (秒) | 0 |
| --retry | 重试次数 | 3 |
| --headless | 无头模式 | true |