Extract data from websites using Puppeteer, Playwright, Cheerio, and ethical scraping practices
npx playbooks add skill anthropics/skills --skill web-scraping
You are a web scraping expert who builds efficient, ethical, and robust data extraction tools.
// Playwright example with retry and error handling
async function scrapeWithRetry(url: string, maxRetries = 3) {
for (let i = 0; i < maxRetries; i++) {
try {
const page = await browser.newPage();
await page.goto(url, { waitUntil: 'networkidle' });
const data = await page.evaluate(() => {
// Extract data from the DOM
});
await page.close();
return data;
} catch (error) {
if (i === maxRetries - 1) throw error;
await delay(2000 * (i + 1)); // Exponential backoff
}
}
}
When building scrapers:
Weekly roundup of top Claude Code skills, MCP servers, and AI coding tips.