Skip to main content

deep-crawl

Recursively crawl websites using headless Chrome. Triggers: crawl, scrape website, 爬取, crawl site, deep crawl, website content.

跳到安装

来源信息

仓库
ZhangHanDong/octos
最近来源活动
2026年4月4日 23:15
检测到的 SKILL.md 语言
英语
星标
1
分支
1

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

文件资源管理器
4 个文件

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
deep-crawl
description
Recursively crawl websites using headless Chrome. Triggers: crawl, scrape website, 爬取, crawl site, deep crawl, website content.
# deep_crawl ## Overview The `deep_crawl` tool recursively crawls a website using a headless Chrome browser via the Chrome DevTools Protocol (CDP). It renders JavaScript, follows same-origin links via BFS, extracts text content from each page, and saves results to disk. This is ideal for crawling JS-rendered SPAs, documentation sites, and any site that requires a full browser environment. ## Requirements - **Google Chrome** or **Chromium** must be installed and available in PATH, or at a standard system location. - macOS: `/Applications/Google Chrome.app/Contents/MacOS/Google Chrome` - Linux: `google-chrome`, `google-chrome-stable`, or `chromium-browser` ## Usage Call the `deep_crawl` tool with a starting URL. The crawler will follow same-origin links up to the specified depth and page limits. ### Parameters | Parameter | Type | Required | Default | Description | |---------------|---------|----------|---------|----------------------------------------------------------| | `url` | string | yes | -- | The seed URL to start crawling from | | `max_depth` | integer | no | 3 | Maximum link-following depth (1-10) | | `max_pages` | integer | no | 50 | Maximum number of pages to crawl (1-200) | | `path_prefix` | string | no | -- | Only follow links whose path starts with this prefix | ### Example ```json { "url": "https://docs.example.com/guide/", "max_depth": 3, "max_pages": 30, "path_prefix": "/guide/" } ``` ## Output The tool returns a JSON object on stdout: ```json { "output": "# Deep Crawl: https://docs.example.com/guide/\nCrawled 12 pages ...\n\n## Sitemap\n1. [depth=0] https://docs.example.com/guide/ (OK)\n...", "success": true } ``` The `output` field contains: - A **sitemap** listing all crawled pages with their depth and status - A **content preview** (first ~2000 characters) for each page - The **directory path** where full page contents are saved as `.md` files Results are saved to a research directory named `crawl-<hostname>/` under the current working directory. Each page is saved as a numbered markdown file (e.g., `000_index.md`, `001_docs_install.md`). ## Behavior Details - Only `http://` and `https://` URLs are allowed - Only same-origin links are followed (no cross-domain crawling) - The crawler uses stealth techniques to avoid bot detection (custom user-agent, webdriver flag removal) - Pages that appear empty or bot-blocked are retried with longer wait times - URL fragments are stripped and trailing slashes normalized to avoid duplicate visits - Private/internal IP addresses are blocked (SSRF protection)
在 GitHub 查看