[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M76ZM9C3NGNAG4QA02JFQ6MD":3,"skill-same:01M76ZM9C3NGNAG4QA02JFQ6MD":60},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":37,"commitSha":38,"skillDirectory":39,"forksCount":40,"repositoryHtmlUrl":41,"repositoryHomepageUrl":42,"ownerHtmlUrl":43,"ownerBlogUrl":6,"ownerDescription":44,"updatedAt":45,"install":46,"resources":59},"01M76ZM9C3NGNAG4QA02JFQ6MD","auto-scraping-to-csv",null,"Scrape any webpage using text-based DOM manipulation and export structured data to CSV.\nThe agent handles complex page nuances — infinite scroll, pagination, popups, lazy loading —\nand asks clarifying questions when data is ambiguous. No external LLM needed.","Lord1Egypt\u002Fawesome-skill-forge","Lord1Egypt","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F99746359?v=4","01M7592YDNT0XK9WJ0T2MQVPDN","Mohamed Mounir Ali AL Keshita","01M75GRFNHC8VZNWEB8DKDE433",3,"MIT","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fcommunity\u002Fclawhub\u002Fa\u002Fauto-scraping-to-csv\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: auto-scraping-to-csv\ndescription: |\n  Scrape any webpage using text-based DOM manipulation and export structured data to CSV.\n  The agent handles complex page nuances — infinite scroll, pagination, popups, lazy loading —\n  and asks clarifying questions when data is ambiguous. No external LLM needed.\nversion: 1.0.0\nmetadata:\n  openclaw:\n    requires:\n      bins:\n        - node\n    install:\n      - kind: node\n        package: playwright\n        bins: [playwright]\n    homepage: https:\u002F\u002Fgithub.com\u002FScience-Prof-Robot\u002Fautoclick\n    emoji: \"🧹\"\n---\n\n# Auto Scraping to CSV — Agent-Driven Web Scraping\n\nScrape any webpage using text-based DOM manipulation and export structured data to CSV. The agent handles complex page nuances — infinite scroll, pagination, popups, lazy loading — and asks clarifying questions when data is ambiguous. No external LLM required.\n\n## Philosophy: Let the Agent Figure It Out\n\nTraditional scraping requires you to inspect HTML, write CSS selectors, handle edge cases, and debug when the site changes. This skill flips that:\n\n**You say what you want. The agent handles the how.**\n\n```\nYou: \"Scrape product catalog\"\nAgent: \"I see 50 products across 5 pages with infinite scroll. \n        I also see 'Price', 'Sale Price', and 'Member Price' columns.\n        Which price field should I extract?\"\nYou: \"Sale Price\"\nAgent: [handles scrolling, pagination, extracts 50 rows] → products.csv\n```\n\nThe agent will:\n1. **Explore** the page structure via text-based DOM\n2. **Detect complexity** — scroll, pagination, tabs, filters\n3. **Ask questions** when ambiguous (multiple price fields, missing data, format choices)\n4. **Handle edge cases** — dismiss popups, wait for lazy loading, retry on errors\n5. **Export CSV** — clean, structured, ready to use\n\n## When to Use\n\n- **Product catalogs**: \"Scrape all laptops with prices and ratings\"\n- **News\u002Farticles**: \"Get latest blog posts with titles, dates, authors\"\n- **Directory listings**: \"Extract all company names, emails, and websites\"\n- **Table data**: \"Get the pricing table from this SaaS page\"\n- **Real estate**: \"Scrape listings with price, beds, baths, square footage\"\n- **Job boards**: \"Get job titles, companies, locations, and salary ranges\"\n- **Social feeds**: \"Extract posts with engagement counts (likes, comments, shares)\"\n- **Research data**: \"Get citation counts, authors, publication dates from this index\"\n\n## How It Works\n\n```\nClaude (Host Model)\n    ↕  HTTP\nBridge Server (Node.js + Playwright)\n    ↕  page.evaluate()\nBrowser (Chromium) ← Page-Agent injected\n```\n\n1. **Bridge** launches a local Chromium browser via Playwright\n2. **Page-Agent** is injected as an IIFE script from CDN into the target page\n3. **Page-Agent** indexes the DOM and generates a simplified text representation:\n   ```\n   [5]\u003Ca >Widget Pro Laptop \u002F>\u003C\u002Fa>\n   [12]\u003Cdiv >$1,299.99 \u002F>\u003C\u002Fdiv>\n   [18]\u003Cdiv >4.5 stars (128 reviews) \u002F>\u003C\u002Fdiv>\n   ```\n4. **Claude** receives the text state, understands the page structure, decides actions\n5. **Agent asks questions** when data is ambiguous or complex\n6. **Loop** continues until all data is extracted or user says stop\n7. **CSV export** converts structured JSON to CSV\n\n---\n\n## First-Time Setup\n\n### 1. Install Playwright\n\n```bash\nnpm install -D playwright\nnpx playwright install chromium\n```\n\n### 2. Place the Bridge Script\n\n```bash\n# Copy from this skill folder to your agents directory\ncp .claude\u002Fskills\u002Fauto-scraping-to-csv\u002Fpage-agent-bridge.mjs .claude\u002Fagents\u002F\n```\n\n### 3. Start the Bridge\n\n```bash\nnode .claude\u002Fagents\u002Fpage-agent-bridge.mjs\n```\n\nDefault port: **9876**.\n\n### 4. Verify Health\n\n```bash\ncurl http:\u002F\u002Flocalhost:9876\u002Fhealth\n```\n\n---\n\n## Agent-Driven Scraping Workflow\n\n### Step 1: Request What You Want\n\n```\n\u002Fscrape-to-csv https:\u002F\u002Fexample.com\u002Fproducts\n  \"Extract all products with name, price, rating, and number of reviews\"\n```\n\n### Step 2: Agent Explores and Asks Questions\n\nThe agent will fetch the DOM state and may ask:\n\n```\nAgent: \"I found 24 products on the current page. The site has infinite scroll \n        and I can see more products loading as I scroll. \n        How many products do you want total? (type 'all' for everything)\"\nYou: \"50\"\n\nAgent: \"I see three price fields:\n        - Original Price: $1,299\n        - Sale Price: $999\n        - Member Price: $899\n        Which one should I extract?\"\nYou: \"Sale Price\"\n\nAgent: \"Some products are out of stock and show 'N\u002FA' for price.\n        Should I:\n        A) Include them with 'N\u002FA'\n        B) Skip those rows\n        C) Mark as 'Out of Stock' in a separate column\"\nYou: \"C\"\n```\n\n### Step 3: Agent Handles Complexity\n\nThe agent automatically:\n- Scrolls to load more content\n- Clicks pagination buttons\n- Waits for lazy-loaded images\u002Fdata\n- Dismisses cookie banners and popups\n- Retries if elements are slow to appear\n- Stops gracefully if the site blocks scraping\n\n### Step 4: Preview and Confirm\n\n```\nAgent: \"Extracted 50 products. Here's a preview:\n\n| name | price | rating | reviews | stock_status |\n|------|-------|--------|---------|-------------|\n| Widget Pro | $999 | 4.5 | 128 | In Stock |\n| Gadget Mini | $499 | 4.2 | 89 | In Stock |\n| ... | ... | ... | ... | ... |\n\nSave as 'products.csv'? (yes\u002Fno\u002Fchange columns)\"\nYou: \"yes\"\n```\n\n### Step 5: CSV Delivered\n\n```\nAgent: \"Saved to .\u002Fproducts.csv — 50 rows, 5 columns\"\n```\n\n---\n\n## Handling Complex Scenarios\n\n### Infinite Scroll\n\n```\nYou: \"Scrape all posts from this feed\"\nAgent: \"The page loads 10 posts at a time via infinite scroll.\n        I've scrolled 3 times and found 30 posts so far.\n        Should I continue scrolling? (yes\u002Fno\u002Fscroll N more times)\"\nYou: \"scroll 5 more times\"\nAgent: [scrolls] → \"Found 80 total posts. Saved to feed.csv\"\n```\n\n### Pagination\n\n```\nYou: \"Get all products from this catalog\"\nAgent: \"I see pagination: Page 1 of 12. \n        I can scrape all 12 pages (may take 2-3 minutes) or a subset.\n        How many pages?\"\nYou: \"all\"\nAgent: [clicks through 12 pages] → \"360 products saved to catalog.csv\"\n```\n\n### Login Required\n\n```\nYou: \"Scrape my order history\"\nAgent: \"The page redirects to a login screen. \n        I need credentials to proceed.\n        Please provide:\n        - Username\u002Femail\n        - Password\n        Or type 'skip' to abort.\"\nYou: \"skip\"\nAgent: \"Aborted. No data extracted.\"\n```\n\n### Multiple Data Formats\n\n```\nYou: \"Get prices from this page\"\nAgent: \"I found prices in multiple formats:\n        - '$19.99' (US format)\n        - '€17.99' (EU format)\n        - '¥2,980' (JP format)\n        Which format should I standardize to?\"\nYou: \"Keep as-is, add a 'currency' column\"\nAgent: [extracts with currency detection] → prices.csv\n```\n\n### Missing \u002F Inconsistent Data\n\n```\nYou: \"Extract employee data from this directory\"\nAgent: \"I see 100 employee cards. Some are missing:\n        - 12 missing phone numbers\n        - 8 missing job titles\n        - 3 missing photos\n        How should I handle missing fields?\n        A) Leave blank\n        B) Fill with 'N\u002FA'\n        C) Skip those rows entirely\"\nYou: \"B\"\nAgent: [extracts 100 rows with 'N\u002FA' for missing fields] → employees.csv\n```\n\n---\n\n## Natural Language Commands\n\n### `\u002Fscrape-to-csv \u003Curl> \u003Cdescription>`\n\nGeneral scraping with CSV export.\n\n```\n\u002Fscrape-to-csv https:\u002F\u002Fnews.ycombinator.com\n  \"Get top 30 stories with title, URL, points, and comment counts\"\n\n\u002Fscrape-to-csv https:\u002F\u002Fwww.anthropic.com\u002Fnews\n  \"Latest blog posts: title, date, category, URL\"\n\n\u002Fscrape-to-csv https:\u002F\u002Fexample.com\u002Frealestate\n  \"Listings: address, price, beds, baths, sqft, listing agent\"\n```\n\n### `\u002Fscrape-table \u003Curl> \u003Cselector_or_description>`\n\nExtract a specific table.\n\n```\n\u002Fscrape-table https:\u002F\u002Fexample.com\u002Fpricing\n  \"The comparison table with Basic\u002FPro\u002FEnterprise columns\"\n\n\u002Fscrape-table https:\u002F\u002Fexample.com\u002Fsales\n  \"Q4 2024 revenue breakdown table\"\n```\n\n### `\u002Fscrape-news \u003Curl>`\n\nOptimized for news\u002Fblog scraping.\n\n```\n\u002Fscrape-news https:\u002F\u002Ftechcrunch.com\n  \"Latest 20 articles: title, author, date, excerpt, URL\"\n\n\u002Fscrape-news https:\u002F\u002Fblog.openai.com\n  \"All posts from 2024: title, date, tags, URL\"\n```\n\n### `\u002Fscrape-products \u003Curl>`\n\nOptimized for e-commerce.\n\n```\n\u002Fscrape-products https:\u002F\u002Famazon.com\u002Fs?k=laptops\n  \"Laptops: name, brand, price, rating, prime eligible, URL\"\n\n\u002Fscrape-products https:\u002F\u002Fshopify-store.com\u002Fcollections\u002Fall\n  \"All products: name, price, compare-at price, availability\"\n```\n\n---\n\n## Output Format\n\nThe agent produces a structured markdown report:\n\n```markdown\n## Scraping Report — example.com\u002Fproducts\n**Session:** a1b2c3d4 | **Duration:** 2m 14s | **Rows:** 50\n\n### Task\nExtract all products with name, price, rating, and number of reviews\n\n### Agent Decisions\n- **Pagination**: Detected infinite scroll, scrolled 5 times\n- **Price field**: Chose \"Sale Price\" per user request\n- **Missing data**: Filled out-of-stock prices with \"N\u002FA\" per user request\n- **Columns**: name, sale_price, rating, review_count, stock_status\n\n### Sample Data\n\n| name | sale_price | rating | review_count | stock_status |\n|------|-----------|--------|-------------|-------------|\n| Widget Pro | $999 | 4.5 | 128 | In Stock |\n| Gadget Mini | $499 | 4.2 | 89 | In Stock |\n| Super Gizmo | $1,299 | 4.8 | 256 | Out of Stock |\n\n### File\n`.\u002Fproducts.csv` — 50 rows, 5 columns\n```\n\n---\n\n## CSV Conversion Options\n\n### Option A — Python (recommended)\n\n```python\nimport json, csv, re\n\n# Bridge returns: \"✅ Executed JavaScript. Result: [{...}, {...}]\"\nmsg = \"\"\"PASTE_BRIDGE_RESPONSE_HERE\"\"\"\nmatch = re.search(r'Result: (\\[.*\\])', msg)\nif match:\n    data = json.loads(match.group(1))\n    with open('output.csv', 'w', newline='') as f:\n        writer = csv.DictWriter(f, fieldnames=data[0].keys())\n        writer.writeheader()\n        writer.writerows(data)\n    print(f\"Wrote {len(data)} rows to output.csv\")\n```\n\n### Option B — Node.js\n\n```javascript\nconst fs = require('fs');\nconst data = JSON.parse(fs.readFileSync('data.json', 'utf8'));\nconst headers = Object.keys(data[0]);\nconst csv = [\n  headers.join(','),\n  ...data.map(row => headers.map(h => `\"${(row[h]||'').replace(\u002F\"\u002Fg,'\"\"')}\"`).join(','))\n].join('\\n');\nfs.writeFileSync('output.csv', csv);\n```\n\n---\n\n## Troubleshooting\n\n### Bridge won't start\n\n```\nError: Cannot find module 'playwright'\n```\n**Fix:** `npm install -D playwright && npx playwright install chromium`\n\n### Site blocks scraping\n\n**Agent detects:** \"The site returned 403 Forbidden. This may be bot protection.\"\n**Options:**\n- Try `headless: false` (looks more like a real user)\n- Add delays between requests\n- Use a different user agent\n\n### Page loads but no data found\n\n**Agent detects:** \"The page loaded but I see mostly navigation elements. Content may be behind a login or loaded dynamically.\"\n**Agent asks:** \"Should I wait longer, scroll down, or do you have login credentials?\"\n\n### Data looks wrong\n\n**Agent detects:** \"Prices show as 'NaN' or empty. The site may use JavaScript to render prices.\"\n**Agent asks:** \"Should I try executing JavaScript to extract the real values, or skip this field?\"\n\n---\n\n## Comparison with Other Tools\n\n| Tool | Setup | Selectors | Complex Pages | Agent Questions | Best For |\n|------|-------|-----------|---------------|-----------------|----------|\n| **Auto Scraping to CSV** | npm install | None needed | Handles automatically | Yes, clarifies ambiguity | One-off extraction, exploratory scraping |\n| BeautifulSoup | pip install | Required | Manual handling | No | Known structure, repeated scraping |\n| Scrapy | Project setup | Required | Middleware needed | No | Large-scale crawling, pipelines |\n| Playwright E2E | npm install | Required | Manual handling | No | Testing, automation |\n| Browser-Use | API key | None | Partial | Limited | Multi-page research |\n\n**Use this skill when:**\n- You want to scrape without writing selectors\n- The page structure is complex or unknown\n- You need the agent to handle edge cases (scroll, popups, pagination)\n- You want clarifying questions when data is ambiguous\n- You need quick one-off extraction to CSV\n\n---\n\n## Bridge API Reference\n\n### `POST \u002Fsessions`\nLaunch a new browser session.\n\n**Body:**\n```json\n{ \"url\": \"https:\u002F\u002Fexample.com\", \"headless\": false }\n```\n\n**Response:** `{ \"id\": \"abc123\", \"url\": \"https:\u002F\u002Fexample.com\" }`\n\n### `GET \u002Fsessions\u002F:id\u002Fstate`\nGet text-based DOM state.\n\n**Response:** `{ url, title, header, content, footer }`\n\n### `POST \u002Fsessions\u002F:id\u002Fact`\nExecute an action.\n\n**Body:**\n```json\n{ \"action\": \"executeJavascript\", \"params\": { \"script\": \"return document.title;\" } }\n```\n\n### `DELETE \u002Fsessions\u002F:id`\nClose session.\n\n### `POST \u002Fshutdown`\nStop bridge.\n\n---\n\n*Skill: auto-scraping-to-csv v1.0.0 | Bridge: page-agent-bridge.mjs | Powered by Alibaba Page-Agent + Playwright*\n","# Auto Scraping to CSV — Agent-Driven Web Scraping\n\nScrape any webpage using text-based DOM manipulation and export structured data to CSV. The agent handles complex page nuances — infinite scroll, pagination, popups, lazy loading — and asks clarifying questions when data is ambiguous. No external LLM required.\n\n## Philosophy: Let the Agent Figure It Out\n\nTraditional scraping requires you to inspect HTML, write CSS selectors, handle edge cases, and debug when the site changes. This skill flips that:\n\n**You say what you want. The agent handles the how.**\n\n```\nYou: \"Scrape product catalog\"\nAgent: \"I see 50 products across 5 pages with infinite scroll. \n        I also see 'Price', 'Sale Price', and 'Member Price' columns.\n        Which price field should I extract?\"\nYou: \"Sale Price\"\nAgent: [handles scrolling, pagination, extracts 50 rows] → products.csv\n```\n\nThe agent will:\n1. **Explore** the page structure via text-based DOM\n2. **Detect complexity** — scroll, pagination, tabs, filters\n3. **Ask questions** when ambiguous (multiple price fields, missing data, format choices)\n4. **Handle edge cases** — dismiss popups, wait for lazy loading, retry on errors\n5. **Export CSV** — clean, structured, ready to use\n\n## When to Use\n\n- **Product catalogs**: \"Scrape all laptops with prices and ratings\"\n- **News\u002Farticles**: \"Get latest blog posts with titles, dates, authors\"\n- **Directory listings**: \"Extract all company names, emails, and websites\"\n- **Table data**: \"Get the pricing table from this SaaS page\"\n- **Real estate**: \"Scrape listings with price, beds, baths, square footage\"\n- **Job boards**: \"Get job titles, companies, locations, and salary ranges\"\n- **Social feeds**: \"Extract posts with engagement counts (likes, comments, shares)\"\n- **Research data**: \"Get citation counts, authors, publication dates from this index\"\n\n## How It Works\n\n```\nClaude (Host Model)\n    ↕  HTTP\nBridge Server (Node.js + Playwright)\n    ↕  page.evaluate()\nBrowser (Chromium) ← Page-Agent injected\n```\n\n1. **Bridge** launches a local Chromium browser via Playwright\n2. **Page-Agent** is injected as an IIFE script from CDN into the target page\n3. **Page-Agent** indexes the DOM and generates a simplified text representation:\n   ```\n   [5]\u003Ca >Widget Pro Laptop \u002F>\u003C\u002Fa>\n   [12]\u003Cdiv >$1,299.99 \u002F>\u003C\u002Fdiv>\n   [18]\u003Cdiv >4.5 stars (128 reviews) \u002F>\u003C\u002Fdiv>\n   ```\n4. **Claude** receives the text state, understands the page structure, decides actions\n5. **Agent asks questions** when data is ambiguous or complex\n6. **Loop** continues until all data is extracted or user says stop\n7. **CSV export** converts structured JSON to CSV\n\n---\n\n## First-Time Setup\n\n### 1. Install Playwright\n\n```bash\nnpm install -D playwright\nnpx playwright install chromium\n```\n\n### 2. Place the Bridge Script\n\n```bash\n# Copy from this skill folder to your agents directory\ncp .claude\u002Fskills\u002Fauto-scraping-to-csv\u002Fpage-agent-bridge.mjs .claude\u002Fagents\u002F\n```\n\n### 3. Start the Bridge\n\n```bash\nnode .claude\u002Fagents\u002Fpage-agent-bridge.mjs\n```\n\nDefault port: **9876**.\n\n### 4. Verify Health\n\n```bash\ncurl http:\u002F\u002Flocalhost:9876\u002Fhealth\n```\n\n---\n\n## Agent-Driven Scraping Workflow\n\n### Step 1: Request What You Want\n\n```\n\u002Fscrape-to-csv https:\u002F\u002Fexample.com\u002Fproducts\n  \"Extract all products with name, price, rating, and number of reviews\"\n```\n\n### Step 2: Agent Explores and Asks Questions\n\nThe agent will fetch the DOM state and may ask:\n\n```\nAgent: \"I found 24 products on the current page. The site has infinite scroll \n        and I can see more products loading as I scroll. \n        How many products do you want total? (type 'all' for everything)\"\nYou: \"50\"\n\nAgent: \"I see three price fields:\n        - Original Price: $1,299\n        - Sale Price: $999\n        - Member Price: $899\n        Which one should I extract?\"\nYou: \"Sale Price\"\n\nAgent: \"Some products are out of stock and show 'N\u002FA' for price.\n        Should I:\n        A) Include them with 'N\u002FA'\n        B) Skip those rows\n        C) Mark as 'Out of Stock' in a separate column\"\nYou: \"C\"\n```\n\n### Step 3: Agent Handles Complexity\n\nThe agent automatically:\n- Scrolls to load more content\n- Clicks pagination buttons\n- Waits for lazy-loaded images\u002Fdata\n- Dismisses cookie banners and popups\n- Retries if elements are slow to appear\n- Stops gracefully if the site blocks scraping\n\n### Step 4: Preview and Confirm\n\n```\nAgent: \"Extracted 50 products. Here's a preview:\n\n| name | price | rating | reviews | stock_status |\n|------|-------|--------|---------|-------------|\n| Widget Pro | $999 | 4.5 | 128 | In Stock |\n| Gadget Mini | $499 | 4.2 | 89 | In Stock |\n| ... | ... | ... | ... | ... |\n\nSave as 'products.csv'? (yes\u002Fno\u002Fchange columns)\"\nYou: \"yes\"\n```\n\n### Step 5: CSV Delivered\n\n```\nAgent: \"Saved to .\u002Fproducts.csv — 50 rows, 5 columns\"\n```\n\n---\n\n## Handling Complex Scenarios\n\n### Infinite Scroll\n\n```\nYou: \"Scrape all posts from this feed\"\nAgent: \"The page loads 10 posts at a time via infinite scroll.\n        I've scrolled 3 times and found 30 posts so far.\n        Should I continue scrolling? (yes\u002Fno\u002Fscroll N more times)\"\nYou: \"scroll 5 more times\"\nAgent: [scrolls] → \"Found 80 total posts. Saved to feed.csv\"\n```\n\n### Pagination\n\n```\nYou: \"Get all products from this catalog\"\nAgent: \"I see pagination: Page 1 of 12. \n        I can scrape all 12 pages (may take 2-3 minutes) or a subset.\n        How many pages?\"\nYou: \"all\"\nAgent: [clicks through 12 pages] → \"360 products saved to catalog.csv\"\n```\n\n### Login Required\n\n```\nYou: \"Scrape my order history\"\nAgent: \"The page redirects to a login screen. \n        I need credentials to proceed.\n        Please provide:\n        - Username\u002Femail\n        - Password\n        Or type 'skip' to abort.\"\nYou: \"skip\"\nAgent: \"Aborted. No data extracted.\"\n```\n\n### Multiple Data Formats\n\n```\nYou: \"Get prices from this page\"\nAgent: \"I found prices in multiple formats:\n        - '$19.99' (US format)\n        - '€17.99' (EU format)\n        - '¥2,980' (JP format)\n        Which format should I standardize to?\"\nYou: \"Keep as-is, add a 'currency' column\"\nAgent: [extracts with currency detection] → prices.csv\n```\n\n### Missing \u002F Inconsistent Data\n\n```\nYou: \"Extract employee data from this directory\"\nAgent: \"I see 100 employee cards. Some are missing:\n        - 12 missing phone numbers\n        - 8 missing job titles\n        - 3 missing photos\n        How should I handle missing fields?\n        A) Leave blank\n        B) Fill with 'N\u002FA'\n        C) Skip those rows entirely\"\nYou: \"B\"\nAgent: [extracts 100 rows with 'N\u002FA' for missing fields] → employees.csv\n```\n\n---\n\n## Natural Language Commands\n\n### `\u002Fscrape-to-csv \u003Curl> \u003Cdescription>`\n\nGeneral scraping with CSV export.\n\n```\n\u002Fscrape-to-csv https:\u002F\u002Fnews.ycombinator.com\n  \"Get top 30 stories with title, URL, points, and comment counts\"\n\n\u002Fscrape-to-csv https:\u002F\u002Fwww.anthropic.com\u002Fnews\n  \"Latest blog posts: title, date, category, URL\"\n\n\u002Fscrape-to-csv https:\u002F\u002Fexample.com\u002Frealestate\n  \"Listings: address, price, beds, baths, sqft, listing agent\"\n```\n\n### `\u002Fscrape-table \u003Curl> \u003Cselector_or_description>`\n\nExtract a specific table.\n\n```\n\u002Fscrape-table https:\u002F\u002Fexample.com\u002Fpricing\n  \"The comparison table with Basic\u002FPro\u002FEnterprise columns\"\n\n\u002Fscrape-table https:\u002F\u002Fexample.com\u002Fsales\n  \"Q4 2024 revenue breakdown table\"\n```\n\n### `\u002Fscrape-news \u003Curl>`\n\nOptimized for news\u002Fblog scraping.\n\n```\n\u002Fscrape-news https:\u002F\u002Ftechcrunch.com\n  \"Latest 20 articles: title, author, date, excerpt, URL\"\n\n\u002Fscrape-news https:\u002F\u002Fblog.openai.com\n  \"All posts from 2024: title, date, tags, URL\"\n```\n\n### `\u002Fscrape-products \u003Curl>`\n\nOptimized for e-commerce.\n\n```\n\u002Fscrape-products https:\u002F\u002Famazon.com\u002Fs?k=laptops\n  \"Laptops: name, brand, price, rating, prime eligible, URL\"\n\n\u002Fscrape-products https:\u002F\u002Fshopify-store.com\u002Fcollections\u002Fall\n  \"All products: name, price, compare-at price, availability\"\n```\n\n---\n\n## Output Format\n\nThe agent produces a structured markdown report:\n\n```markdown\n## Scraping Report — example.com\u002Fproducts\n**Session:** a1b2c3d4 | **Duration:** 2m 14s | **Rows:** 50\n\n### Task\nExtract all products with name, price, rating, and number of reviews\n\n### Agent Decisions\n- **Pagination**: Detected infinite scroll, scrolled 5 times\n- **Price field**: Chose \"Sale Price\" per user request\n- **Missing data**: Filled out-of-stock prices with \"N\u002FA\" per user request\n- **Columns**: name, sale_price, rating, review_count, stock_status\n\n### Sample Data\n\n| name | sale_price | rating | review_count | stock_status |\n|------|-----------|--------|-------------|-------------|\n| Widget Pro | $999 | 4.5 | 128 | In Stock |\n| Gadget Mini | $499 | 4.2 | 89 | In Stock |\n| Super Gizmo | $1,299 | 4.8 | 256 | Out of Stock |\n\n### File\n`.\u002Fproducts.csv` — 50 rows, 5 columns\n```\n\n---\n\n## CSV Conversion Options\n\n### Option A — Python (recommended)\n\n```python\nimport json, csv, re\n\n# Bridge returns: \"✅ Executed JavaScript. Result: [{...}, {...}]\"\nmsg = \"\"\"PASTE_BRIDGE_RESPONSE_HERE\"\"\"\nmatch = re.search(r'Result: (\\[.*\\])', msg)\nif match:\n    data = json.loads(match.group(1))\n    with open('output.csv', 'w', newline='') as f:\n        writer = csv.DictWriter(f, fieldnames=data[0].keys())\n        writer.writeheader()\n        writer.writerows(data)\n    print(f\"Wrote {len(data)} rows to output.csv\")\n```\n\n### Option B — Node.js\n\n```javascript\nconst fs = require('fs');\nconst data = JSON.parse(fs.readFileSync('data.json', 'utf8'));\nconst headers = Object.keys(data[0]);\nconst csv = [\n  headers.join(','),\n  ...data.map(row => headers.map(h => `\"${(row[h]||'').replace(\u002F\"\u002Fg,'\"\"')}\"`).join(','))\n].join('\\n');\nfs.writeFileSync('output.csv', csv);\n```\n\n---\n\n## Troubleshooting\n\n### Bridge won't start\n\n```\nError: Cannot find module 'playwright'\n```\n**Fix:** `npm install -D playwright && npx playwright install chromium`\n\n### Site blocks scraping\n\n**Agent detects:** \"The site returned 403 Forbidden. This may be bot protection.\"\n**Options:**\n- Try `headless: false` (looks more like a real user)\n- Add delays between requests\n- Use a different user agent\n\n### Page loads but no data found\n\n**Agent detects:** \"The page loaded but I see mostly navigation elements. Content may be behind a login or loaded dynamically.\"\n**Agent asks:** \"Should I wait longer, scroll down, or do you have login credentials?\"\n\n### Data looks wrong\n\n**Agent detects:** \"Prices show as 'NaN' or empty. The site may use JavaScript to render prices.\"\n**Agent asks:** \"Should I try executing JavaScript to extract the real values, or skip this field?\"\n\n---\n\n## Comparison with Other Tools\n\n| Tool | Setup | Selectors | Complex Pages | Agent Questions | Best For |\n|------|-------|-----------|---------------|-----------------|----------|\n| **Auto Scraping to CSV** | npm install | None needed | Handles automatically | Yes, clarifies ambiguity | One-off extraction, exploratory scraping |\n| BeautifulSoup | pip install | Required | Manual handling | No | Known structure, repeated scraping |\n| Scrapy | Project setup | Required | Middleware needed | No | Large-scale crawling, pipelines |\n| Playwright E2E | npm install | Required | Manual handling | No | Testing, automation |\n| Browser-Use | API key | None | Partial | Limited | Multi-page research |\n\n**Use this skill when:**\n- You want to scrape without writing selectors\n- The page structure is complex or unknown\n- You need the agent to handle edge cases (scroll, popups, pagination)\n- You want clarifying questions when data is ambiguous\n- You need quick one-off extraction to CSV\n\n---\n\n## Bridge API Reference\n\n### `POST \u002Fsessions`\nLaunch a new browser session.\n\n**Body:**\n```json\n{ \"url\": \"https:\u002F\u002Fexample.com\", \"headless\": false }\n```\n\n**Response:** `{ \"id\": \"abc123\", \"url\": \"https:\u002F\u002Fexample.com\" }`\n\n### `GET \u002Fsessions\u002F:id\u002Fstate`\nGet text-based DOM state.\n\n**Response:** `{ url, title, header, content, footer }`\n\n### `POST \u002Fsessions\u002F:id\u002Fact`\nExecute an action.\n\n**Body:**\n```json\n{ \"action\": \"executeJavascript\", \"params\": { \"script\": \"return document.title;\" } }\n```\n\n### `DELETE \u002Fsessions\u002F:id`\nClose session.\n\n### `POST \u002Fshutdown`\nStop bridge.\n\n---\n\n*Skill: auto-scraping-to-csv v1.0.0 | Bridge: page-agent-bridge.mjs | Powered by Alibaba Page-Agent + Playwright*\n",{"name":5,"version":24,"metadata":25,"description":36},"1.0.0",{"openclaw":26},{"emoji":27,"install":28,"homepage":33,"requires":34},"🧹",[29],{"bins":30,"kind":32,"package":31},[31],"playwright","node","https:\u002F\u002Fgithub.com\u002FScience-Prof-Robot\u002Fautoclick",{"bins":35},[32],"Scrape any webpage using text-based DOM manipulation and export structured data to CSV.\nThe agent handles complex page nuances — infinite scroll, pagination, popups, lazy loading —\nand asks clarifying questions when data is ambiguous. No external LLM needed.\n","master","4aa004da461d820f4ea5499e58eb8d196cf99016","community\u002Fclawhub\u002Fa\u002Fauto-scraping-to-csv",0,"https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge","https:\u002F\u002Fskill-explorer-rho.vercel.app","https:\u002F\u002Fgithub.com\u002FLord1Egypt","Unbreakable. Unstoppable. Unmatched⚡.\r\n Speaker of machine tongues 🤖  | World-builder of decentralized dreams 🌐 | Defender of the digital realm🛡️.","2026-06-10 08:21:01",{"source":8,"skillName":5,"commands":47,"prompt":57,"zipAvailable":58},[48,51,54],{"tool":49,"command":50},"npx","npx skills add Lord1Egypt\u002Fawesome-skill-forge --skill auto-scraping-to-csv",{"tool":52,"command":53},"bunx","bunx skills add Lord1Egypt\u002Fawesome-skill-forge --skill auto-scraping-to-csv",{"tool":55,"command":56},"pnpm","pnpm dlx skills add Lord1Egypt\u002Fawesome-skill-forge --skill auto-scraping-to-csv","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fcommunity\u002Fclawhub\u002Fa\u002Fauto-scraping-to-csv\u002FSKILL.md",true,[],[61,69,76,83,90,97],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":68},"01M785WKJB99G3STR1NF9NRTJW","youtube-content","YouTube transcripts to summaries, threads, blogs.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fyoutube-content\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":68},"01M785WEFHB0G2S9YA6EPR3H0E","xurl","X\u002FTwitter via xurl CLI: post, search, DM, media, v2 API.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fxurl\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":68},"01M785W98EDN4EFJXJPMQEHCRC","touchdesigner-mcp","Control a running TouchDesigner instance via twozero MCP — create operators, set parameters, wire connections, execute Python, build real-time visuals. 36 native tools.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Ftouchdesigner-mcp\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":68},"01M785W5S9FP3QBH2V191E025P","test-driven-development","TDD: enforce RED-GREEN-REFACTOR, tests before code.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Ftest-driven-development\u002FSKILL.md",[],[],{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":68},"01M785W2AS08NSSH9YATCV6FJB","teams-meeting-pipeline","Operate the Teams meeting summary pipeline via Hermes CLI — summarize meetings, inspect pipeline status, replay jobs, manage Microsoft Graph subscriptions.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fteams-meeting-pipeline\u002FSKILL.md",[],[],{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":68},"01M785VXKW4T34BTP1SCHW1R7F","systematic-debugging","4-phase root cause debugging: understand bugs before fixing.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fsystematic-debugging\u002FSKILL.md",[],[]]