Skip to content
crawl logo

Crawl

crawl

根据用户需求,使用已经登录的浏览器,基于chrome-devtools 工具的方式来从浏览器中获取用户需要的内容,支持文章内容提取和批量处理。仅用来获取那些需要登录后才能完整访问的网站。

SKILL.md

Full skill instructions

crawl

Reference

请先参考学习how-to-crawl-with-chrome-dev-mcp.md

Instructions

这个程序仅用来处理那些需要登陆后才能完整登录的网站,在处理过程中不要尝试生成采用其他框架或者程序来获取内容,这样获取的内容是不完整的。

  1. 使用python脚本程序,先判断当前是在macos还是windows环境
  2. 根据当前的操作系统环境,开启新浏览器实例
  3. 检查mcp工具chrome-devtools是否就绪,如果还未就绪请重新连接mcp工具
  4. 你只能使用chrome-devtols来获取浏览器中的信息,请调用mcp工具完成用户给出的任务
  5. 重要: 所有输出文件和程序都必须保存在项目根目录下的 output 文件夹中

MCP 配置要求

{
  "mcpServers": {
    "chrome-devtools": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "chrome-devtools-mcp@latest",
        "--browser-url=http://127.0.0.1:9222"
      ],
      "env": {}
    }
  }
}

🚀 核心功能

1. 智能浏览器管理

  • 自动环境检测: 智能识别 Windows/​macOS/​Linux 环境
  • 自动浏览器启动: 根据系统自动启动Chrome实例
  • MCP连接检查: 自动验证Chrome DevTools MCP连接状态
  • 代理配置支持: 支持自动代理配置

2. 统一API集成

  • API服务管理: 自动启动和管理API服务
  • 数据格式验证: 确保数据符合API要求
  • 批量数据写入: 支持批量数据高效写入
  • 错误重试机制: 自动重试失败的数据写入

3. 文章内容提取

使用集成的文章内容提取器,支持以下网站:

  • X/​Twitter (x.com) - 推文内容提取
  • The Atlantic (theatlantic.com)
  • Medium (medium.com)

📁 输出目录结构

output/
├── logs/              # 执行日志
├── data/              # 数据文件
├── snapshots/         # 页面快照
└── reports/           # 执行报告

📚 相关文档

文档描述用途
QUICK_START.md快速启动指南新手入门
EXAMPLES.md详细使用示例参考代码
BEST_PRACTICES.md最佳实践指南进阶优化
crawl_manager.py核心管理器直接使用

🎯 快速开始

方法一:使用核心管理器(推荐)

from .crawl_manager import extract_x_tweets

# 提取Elon Musk的最新5篇推文
result = extract_x_tweets("elonmusk", 5)
print(result)

方法二:使用标准模板

# 参考 EXAMPLES.md 中的完整示例

⚡ 性能特点

  • ✅ 一键式启动 - 自动环境配置
  • ✅ 智能重试 - 自动错误恢复
  • ✅ 数据验证 - 确保数据质量
  • ✅ 日志追踪 - 完整执行记录
  • ✅ 批量处理 - 高效数据处理

🚨 重要提醒

  1. Output目录: 所有输出文件必须保存在 output/ 目录下
  2. URL要求: 数据必须有有效的URL字段
  3. 依赖检查: 使用前确保Chrome和相关依赖已安装
  4. 网络环境: 根据需要配置代理设置

📖 详细文档

More Other skills

Delegate independent tasks to specialized agents working concurrently with isolated context.

295.4K 206.3K
View

Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.

179.7K 100.1K
View

Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors/fonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.

179.7K 89.5K
View

A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill whenever asked to write some sort of internal communications (status reports, leadership updates, 3P updates, company newsletters, FAQs, incident reports, project updates, etc.).

179.7K 76.1K
View

Fundamental design principles for writing maintainable, testable Python code.

40.2K 21.9K
View

Modern responsive layouts using container queries, fluid typography, CSS Grid, and mobile-first strategies.

40.2K 20K
View

Generate Playwright tests from scenarios using interactive browser exploration and validation.

39.7K 18.2K
View

Modern React state management with Redux Toolkit, Zustand, Jotai, and React Query for every state category.

40.2K 14.7K
View

GDPR-compliant data handling with consent management, data subject rights, and privacy controls.

40.2K 14.3K
View

Python error handling patterns including input validation, exception hierarchies, and partial failure handling. Use when implementing validation logic, designing exception strategies, handling batch processing failures, or building robust APIs.

40.2K 13.5K
View

Detailed multi-file refactor planning with safety checks and rollback guidance.

39.7K 13K
View