playwright-scraper-skill

Scrape dynamic and anti-bot protected websites using Playwright with stealth browser automation.

Updated Sep 5, 2026
One-click install
npx skills add https://github.com/SillyHippy/zo-skills --skill playwright-scraper-skill-sillyhippy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: playwright-scraper-skill
Source: https://github.com/SillyHippy/zo-skills/tree/main/skills/playwright-scraper-skill
Command: npx skills add https://github.com/SillyHippy/zo-skills --skill playwright-scraper-skill-sillyhippy

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires playwright, and includes scripts (resource) components.

What problem does it solve? Many websites block simple HTTP fetch requests with JavaScript rendering requirements, Cloudflare challenges, or bot detection, making content extraction fail with 403 errors or blank pages. ## Core Features & Use Cases - Simple Mode: Fast scraping of dynamic JavaScript-rendered pages using scripts/playwright-simple.js, returning title, content, and metadata as JSON. - Stealth Mode: Anti-bot scraping via scripts/playwright-stealth.js that hides navigator.webdriver, uses realistic mobile User-Agents, and detects Cloudflare challenges, with screenshot and HTML saving support. - Use Case: Scrape a Cloudflare-protected forum like Discuss.com.hk by running the stealth script, which returns structured JSON with page content, extracted links, and a screenshot after bypassing bot detection. ## Quick Start Ask the AI to scrape a protected URL such as "https://m.discuss.com.hk/#hot" using the Playwright stealth script and return the page title, content, and a screenshot.

Frequently Asked Questions about playwright-scraper-skill

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I scrape a website protected by Cloudflare?

Use the stealth script with node scripts/playwright-stealth.js followed by the URL. It hides navigator.webdriver, uses a realistic iPhone User-Agent, and waits extra time when a Cloudflare challenge is detected.

What is the difference between Playwright simple and stealth mode?

Simple mode is fast (3-5 seconds) for dynamic sites without bot protection. Stealth mode takes 5-20 seconds but adds anti-detection techniques like hiding automation markers and realistic headers for protected sites.

Does Playwright scraping work when web_fetch returns 403?

Yes, stealth mode is designed for exactly this case. Testing showed 100% success on Discuss.com.hk where plain fetch and Crawlee both failed with 403 errors.

How do I save a screenshot or HTML while scraping with Playwright?

Set the SCREENSHOT_PATH environment variable to save a screenshot, and SAVE_HTML=true to save the full page HTML. Both work with the stealth script alongside the JSON output.

Why does my Playwright scraper get detected by anti-bot systems?

Detection usually happens because navigator.webdriver is exposed or the User-Agent looks automated. The stealth script fixes this via addInitScript injection before page load and realistic mobile device headers.

What are the limitations of this Playwright scraping approach?

It does not currently support proxy rotation, CAPTCHA solving, or cookie-based login sessions. Sites requiring authentication or aggressive CAPTCHA challenges will need manual workarounds or additional tooling.