Puppeteer stealth
Ethical web automation with Puppeteer Stealth for anti-bot evasion, featuring randomized configurations, cookie management, and human-like behavior patternsFrom its SKILL.md
npx -y skills add aegntic/cldcde --skill puppeteer-stealthAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 11 stars11 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
2.6 KB, as published. Nobody here has run it
Puppeteer Stealth Skill
A comprehensive web automation skill that implements ethical browser automation with anti-bot evasion capabilities using Puppeteer Extra and Stealth plugin.
Features
- Stealth Mode: Uses puppeteer-extra-plugin-stealth to avoid detection
- Randomized Configurations: User-agent rotation, viewport variation, and fingerprint randomization
- Cookie Management: Import/export cookies for session persistence
- CAPTCHA Detection: Screenshot capture and analysis for CAPTCHA identification
- Human-like Behavior: Realistic delays and interaction patterns
- Flexible Modes: Support for both headless and headful browser operations
- Error Handling: Robust handling of Cloudflare challenges and common anti-bot measures
- Ethical Compliance: Built-in rate limiting and respectful scraping practices
Usage
// Basic stealth scraping
const result = await skill.stealthScrape({
url: 'https://example.com',
selector: '.content',
options: { headless: true, captureScreenshots: true }
});
// Cookie management
await skill.saveCookies('session-cookies.json');
await skill.loadCookies('session-cookies.json');
// Human-like interaction
await skill.humanClick('.button');
await skill.humanType('#search', 'query', { delay: 100 });
API Reference
Methods
initialize(options)- Initialize stealth browser instancestealthScrape(config)- Perform stealthy web scrapinghumanClick(selector)- Simulate human-like clickhumanType(selector, text, options)- Simulate human-like typingsaveCookies(filepath)- Export cookies to fileloadCookies(filepath)- Import cookies from filecaptureScreenshot(path)- Take screenshot for analysisdetectCaptcha()- Detect if CAPTCHA is presenthandleCloudflare()- Attempt to bypass Cloudflare challengesclose()- Clean up browser resources
Installation
Install dependencies in your project:
npm install puppeteer puppeteer-extra puppeteer-extra-plugin-stealth puppeteer-extra-plugin-user-preferences user-agents
Ethical Guidelines
- Always respect robots.txt files
- Implement reasonable delays between requests
- Do not overload target servers
- Use only for legitimate purposes
- Comply with website terms of service
- Never use for malicious activities