34 lines
998 B
Markdown
34 lines
998 B
Markdown
# WEB-AUTOMATION
|
|
|
|
## Purpose
|
|
|
|
Automate browsing and scraping with Playwright + Camoufox.
|
|
|
|
## Requirements
|
|
|
|
- Node.js 20+
|
|
- pnpm
|
|
- `playwright-core`
|
|
- `camoufox-js`
|
|
|
|
## Setup Summary
|
|
|
|
1. Install skill files for your agent.
|
|
2. `cd .../skills/web-automation/scripts`
|
|
3. `pnpm install`
|
|
4. `pnpm add playwright-core camoufox-js`
|
|
5. `npx camoufox-js fetch`
|
|
|
|
## Dependency Checks
|
|
|
|
```bash
|
|
node -e "require.resolve('playwright-core/package.json');require.resolve('camoufox-js/package.json');console.log('OK: playwright-core + camoufox-js installed')"
|
|
node -e "const fs=require('fs');const t=fs.readFileSync('browse.ts','utf8');if(!/camoufox-js/.test(t)){throw new Error('browse.ts is not configured for Camoufox')}console.log('OK: Camoufox integration detected in browse.ts')"
|
|
```
|
|
|
|
## Usage Examples
|
|
|
|
- Browse: `npx tsx browse.ts --url "https://example.com"`
|
|
- Scrape: `npx tsx scrape.ts --url "https://example.com" --mode main --output page.md`
|
|
- Auth: `npx tsx auth.ts --url "https://example.com/login"`
|