1.1 KiB
1.1 KiB
name, description
| name | description |
|---|---|
| web-automation | Browse and scrape web pages using Playwright with Camoufox anti-detection browser. Use when automating web workflows, extracting page content to markdown, handling authenticated sessions, or scraping websites with bot protection. |
Web Automation with Camoufox (OpenCode)
Automated web browsing and scraping using Playwright with Camoufox anti-detection browser.
Requirements
- Node.js 20+
- pnpm
- Network access to download browser binaries
First-Time Setup
# Use your OpenCode skills path
cd ~/.opencode/skills/web-automation/scripts
pnpm install
npx camoufox-js fetch
If native dependency build errors appear (e.g., better-sqlite3), rebuild from the reported package directory.
Quick Reference
- Browse page:
npx tsx browse.ts --url "https://example.com" - Scrape markdown:
npx tsx scrape.ts --url "https://example.com" --mode main --output page.md - Authenticate:
npx tsx auth.ts --url "https://example.com/login"
Notes
- Sessions persist in Camoufox profile storage.
- Use
--waitfor dynamic pages. - Use
--mode selector --selector "..."for targeted extraction.