跳到正文
Skillpedia
网页抓取20k · #10409

BrightData

它能做什么

这个技能让 AI 获取网页内容,或抓取整个网站,并以 markdown 形式返回。它适用于需要网页文本用于研究或分析,并且尊重每个网站条款的人。

适用场景

  • ✓当你想把网页转换为干净的 markdown 以便阅读或分析的时候。
  • ✓当你想抓取整个网站并收集其页面的时候。
  • ✓当页面需要真实浏览器渲染后才能读取内容的时候。

技能链接

https://github.com/danielmiessler/LifeOS/blob/main/LifeOS/install/skills/BrightData/SKILL.md

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

使用方法

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

可直接粘贴的消息

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

可以这样问 AI

“请抓取这个页面并以 markdown 形式给我文本,并告诉我哪种方法有效。”

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

工作原理

AI 会先尝试成本最低的方法,例如普通请求,只有在简单方法失败时才转向浏览器或托管抓取服务。它会为每个页面标注获取它所用的方法。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

BrightData

Fetches a single URL (FourTierScrape) or crawls a whole site (Crawl), moving through four tiers only as far as each page needs, always within the target site's terms and robots.txt. A site that refuses automated access is reported, not worked around. Output is always markdown. A Cloudflare Accept: text/markdown pre-check runs before Tier 1 (recipe in FourTierScrape.md).

Ideal State

  • Every page comes back as clean markdown that matches its URL, labeled with the tier that actually retrieved it.
  • Cost tracks need: free tiers are tried first, and paid Bright Data calls (Tier 4, whether for one URL or for the pages of a Light Crawl that need it, and Full Crawl) happen only when cheaper ones fail or the user confirms.
  • A crawl returns a site map, the page contents and its stats, with failed pages named rather than silently missing.

Intent Routing

Intent Trigger File
FourTierScrape "scrape/fetch/pull/get/retrieve [URL]", "fetch this page as markdown", "this page needs rendering", "use Bright Data to fetch" Intents/FourTierScrape.md
Crawl "crawl this site", "spider this domain", "map this website", "get all pages from", "scrape the whole site", "crawl all pages under /docs" Intents/Crawl.md

References

File Read when
Setup.md first-time setup: the free tiers, the paid Bright Data pieces (MCP server, API key, crawl dataset id), and a proof

The four tiers (tool contract)

Tier Tool Wins on Cost / latency
1 plain curl -sL, raw HTML converted to markdown locally public content free · ~1-3s
2 curl + declared user agent and Accept headers servers that need content negotiation free · ~3-7s
3 Interceptor (real Chrome) JavaScript-rendered / SPA pages free · ~10-20s
4 Bright Data MCP mcp__Brightdata__scrape_as_markdown managed rendering, region-specific fetches Bright Data credits · ~5-15s

Every tier returns the page itself. WebFetch is never a tier: it hands back a small model's summary of the page, not the page.

Skip-ahead: explicit "use Bright Data" → Tier 4; "use browser" → Tier 3; a domain that already failed Tier 1 for a non-refusal reason (empty body, timeout) → start at Tier 2. A CAPTCHA, block page or login wall at any tier ends the retrieval with a report. The exact curl header block, Cloudflare pre-check, and Interceptor commands live in Intents/FourTierScrape.md.

Data & Config

User customizations live at <configRoot>/LIFEOS/USER/CUSTOMIZATIONS/SKILLS/BrightData/ (configRoot is $CLAUDE_CONFIG_DIR when set, else ~/.claude). If this directory exists, load and apply any PREFERENCES.md, configurations, or resources found there; they override default behavior. If it does not exist, proceed with skill defaults. First-time setup (accounts, keys, config, a proof it works) is in Setup.md.

The paid paths need pieces this skill does not install. Tier 4 needs the Bright Data MCP server, which supplies mcp__Brightdata__scrape_as_markdown and scrape_batch. Full Crawl needs BRIGHT_DATA_API_KEY and BRIGHT_DATA_CRAWL_DATASET_ID (the Crawl API dataset id from the Bright Data dashboard) in the environment. Before the first paid call, confirm the MCP tools are present in the session and that bun LIFEOS/TOOLS/Secrets.ts has BRIGHT_DATA_API_KEY BRIGHT_DATA_CRAWL_DATASET_ID prints yes for each key the call needs. When a piece is missing, stop at the last free tier and tell the user which piece is not configured; never report a Tier 4 or Full Crawl result that did not run.

Gotchas

  • Bright Data proxy has usage costs. Don't use Tier 4 for sites accessible via Tier 1-3.
  • Tier 4 is slower than the free tiers. Allow extra time for its responses.
  • Credentials belong in ~/.claude/.env — BRIGHT_DATA_API_KEY (the name Intents/Crawl.md commands read). Check as Data & Config says instead of assuming the paid tiers work.

Examples

  • "Fetch example.com/pricing as markdown" → FourTierScrape. The pre-check returns HTML, Tier 1 returns an empty body, and Tier 2's declared headers get the page, delivered as markdown labeled Tier 2. If Tier 1 had returned a block page instead, the reply would report the block and stop.
  • "Crawl the docs under docs.example.com/api/" → Crawl, a Light Crawl scoped to /api/, depth 3, at the default limit of 20 pages, which needs no confirmatio
常见问题

它会无视网站规则吗?

不会。该技能要求遵守每个网站的条款和 robots.txt,遇到拒绝自动访问的网站时会如实报告,而不会想办法绕过。

它会花钱吗?

会先尝试免费方法。只有在更便宜的方法失败或你确认后,才会进行付费抓取。

抓取会返回什么?

网站地图、页面内容和统计数据,并会注明失败的页面。

详情

作者的原始描述

4-tier page fetching that moves from plain curl to curl with declared headers to a real browser through Interceptor to Bright Data's managed fetch product, single URL or multi-page crawl, output as markdown, within each target site's terms. USE WHEN Bright Data, scrape URL, web scraping, crawl site, extract page content, scrape whole site, spider domain, convert URL to markdown, page needs rendering. NOT FOR simple public content (WebFetch), social data with named actors, logged-in browser sessions (Interceptor), or multi-source investigation (Research).

repo: danielmiessler/LifeOS

热度

GitHub 星标
20k
排名
#10409
许可证
MIT
更新时间
2026/10/28

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能