跳到正文
TakoAPI
返回技能列表

crawl4ai

由 codylrn804 提供

Web & Frontend Development
1.5k下载量由 clawskills.sh 提供
2星标
0浏览量
0 个赞登录后即可为这个技能点赞
—暂无评分
你的评分

简介

AI-powered web scraping framework for extracting structured data from websites.

描述

该技能的功能

Crawl4ai is a Python web scraping framework that combines browser automation with AI-assisted parsing to extract structured data from websites. It handles JavaScript-rendered pages, injects custom JS, and outputs clean markdown, HTML, or structured JSON.

Handles JavaScript-rendered content natively without requiring a separate browser driver setup, unlike BeautifulSoup or Scrapy alone.

何时使用

  • Scraping product prices and names from an e-commerce site
  • Extracting article titles from a news or blog page
  • Pulling form data from a page that loads via JavaScript
  • Cleaning and converting messy HTML into readable markdown
  • Batch scraping multiple URLs in a single session

示例工作流

输入

User asks: Extract all product names and prices from this e-commerce URL

智能体
  1. 1

    Instantiate AsyncWebCrawler with headless browser mode

  2. 2

    Run crawler on the URL with javascript=true and a custom js_code selector targeting product elements

  3. 3

    Receive extracted_content with structured name/price fields

  4. 4

    Filter and normalize the returned array into a clean list

输出

JSON array of objects each containing product name and price

安装

clawhub install codylrn804/crawl4ai

运行 CLI 命令,或把这段提示词粘贴到 Claude Code、Cursor、Codex 或你在用的任意编程智能体里。

链接