跳到正文
Skillpedia
网页抓取33k · #9100

scrape

它能做什么

这项技能为你的智能体提供通过 Bright Data Web Unlocker 抓取单个网页的方法。适合需要以可读形式获取网页文字的人。

适用场景

  • ✓想获取文章或商品页面的可读文字的时候。
  • ✓网站拦截了普通的网页获取,需要更可靠的读取方式的时候。
  • ✓想把页面内容保存为 Markdown,用于笔记或进一步处理的时候。

技能链接

https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/web-data/scrape/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/web-data/scrape/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请帮我读取这篇新闻文章,并以 Markdown 格式给我文字内容。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体把网页地址发送给 Bright Data,由其处理机器人检测,然后返回格式化为 Markdown 的页面内容。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Bright Data - Web Scraper

Scrape any webpage and get clean markdown content using Bright Data's Web Unlocker API. Automatically bypasses bot detection and CAPTCHA.

Setup

1. Get your API Key: Get a key from Bright Data Dashboard.

2. Create a Web Unlocker zone: Create a zone at brightdata.com/cp by clicking "Add" (top-right), selecting "Unlocker zone".

3. Set environment variables:

export BRIGHTDATA_API_KEY="your-api-key"
export BRIGHTDATA_UNLOCKER_ZONE="your-zone-name"

Usage

bash scripts/scrape.sh "url"

Parameters:

  • url (required): The webpage URL to scrape

Examples:

# Scrape a news article
bash scripts/scrape.sh "https://example.com/article"

# Scrape a product page
bash scripts/scrape.sh "https://shop.example.com/product/123"

Output Format

Returns clean markdown content extracted from the webpage:

# Page Title

Main content of the page converted to markdown format...

## Section Heading

More content...

Features

  • Bot Detection Bypass: Automatically handles anti-bot measures
  • CAPTCHA Solving: Bypasses CAPTCHA challenges
  • Clean Markdown: Returns well-formatted markdown content
  • JavaScript Rendering: Handles JavaScript-heavy pages

Dependencies

  • curl - For API requests
常见问题

需要设置什么?

需要把 Bright Data API 密钥和 Unlocker 区域名称设置为环境变量。

它能处理验证码吗?

该技能说明,它通过 Web Unlocker 绕过机器人检测和验证码挑战。

它能读取需要 JavaScript 的页面吗?

能。该技能说明,它可以处理依赖大量 JavaScript 的页面。

详情

作者的原始描述

Scrape any webpage as clean markdown via Bright Data Web Unlocker API. Bypasses bot detection and CAPTCHA. Requires BRIGHTDATA_API_KEY and BRIGHTDATA_UNLOCKER_ZONE environment variables.

repo: davila7/claude-code-templates

热度

GitHub 星标
33k
排名
#9100
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能