跳到正文
TakoAPI
返回技能列表

playwright-scraper-skill

由 waisimon 提供

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

简介

Playwright-based web scraping OpenClaw Skill with anti-bot protection.

描述

该技能的功能

Playwright-based scraper with three tiers of anti-bot handling. Covers static pages via built-in fetch, JavaScript-rendered pages via standard Playwright, and Cloudflare-protected sites via a stealth mode that masks automation markers and mimics real device behavior.

Playwright Stealth achieved 100% success on Cloudflare-protected sites where Crawlee, standard Puppeteer, and Rust-based alternatives all failed with 0-20% success rates.

何时使用

  • Scraping content from Cloudflare-protected forums
  • Extracting data from JavaScript-rendered e-commerce pages
  • Monitoring dynamic news sites that block standard crawlers
  • Saving HTML snapshots of pages requiring JS execution
  • Collecting structured data from community discussion boards

示例工作流

输入

User asks: scrape the top posts from https://m.discuss.com.hk/#hot

智能体
  1. 1

    Identifies the site uses Cloudflare anti-bot protection

  2. 2

    Selects playwright-stealth.js as the appropriate script

  3. 3

    Runs the script with the target URL

  4. 4

    Script sets a realistic mobile User-Agent, hides webdriver markers, and adds random delays to mimic human behavior

  5. 5

    Returns JSON with page title and content, saves screenshot.png and page.html locally

输出

JSON object with url, title, and content fields, plus screenshot and HTML file saved to disk

前置要求

  • Playwright Chromium browser (installed via npx playwright install chromium)

安装

clawhub install waisimon/playwright-scraper-skill

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

链接