agentleFS
MathiasPaulenkoMathiasPaulenko/ai-toolkit/skills/wavexis-web-scraping/SKILL.md

WaveXis Web Scraping

Skill2 starsChanged 4 months agoMITView on GitHub

Web scraping with wavexis. Stealth mode for anti-bot sites, crawl command for multi-page scraping, natural language selectors, shadow DOM scraping, batch processing.

  • Reads credentials
  • Installs packages

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 2 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use natural language instead of CSS/XPath to describe what you want to extract.

    line 188
  2. Distinctive:

    Avoid re-analyzing pages you've already scraped.

    line 359
  3. Very specific:

    Use --delay of at least 1-2 seconds between requests

    line 408
  4. Very specific:

    Keep --concurrent low (1-2) to avoid overwhelming the server

    line 409
  5. Very specific:

    Use --respect-robots to honor robots.txt

    line 410
  6. Very specific:

    Use --url-exclude to skip non-content pages (e.g., /print/, /share/)

    line 412

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

WaveXis Web Scraping

Description

Web scraping with wavexis — the CLI tool that wraps cdpwave and bidiwave. Covers stealth mode for anti-bot sites, the scrape command with CSS selectors, crawl for site-wide crawling, nl for natural language selectors, shadow for Shadow DOM scraping, batch for processing multiple URLs, auth context for scraping behind login, action caching, and rate limiting.

When to Invoke

  • Scraping a single page or multiple pages with wavexis
  • Needing stealth mode to bypass anti-bot detection
  • Crawling an entire site or section of a site
  • Using natural language selectors instead of CSS/XPath
  • Scraping Shadow DOM content
  • Processing a list of URLs in batch
  • Scraping behind authentication (login required)
  • Setting up polite crawling with rate limiting

Prerequisites

  • pip install wavexis[cdp] or pip install wavexis[bidi]
  • Chrome or Edge installed (for CDP backend)
  • Basic familiarity with wavexis CLI (see wavexis-cli-automation skill)

Stealth Mode

Stealth mode hides automation indicators to avoid detection by anti-bot systems.

Basic stealth

wavexis scrape https://example.com --stealth

What stealth mode hides

IndicatorWhat it does
navigator.webdriverRemoves the webdriver property
Chrome pluginsFakes navigator.plugins array
WebGL vendorSpoofs WebGL renderer and vendor
Chrome runtimeHides window.chrome object
LanguagesSets realistic navigator.languages
PermissionsOverrides navigator.permissions.query
User agentRemoves HeadlessChrome from UA string
CDP detectionPatches Runtime.enable leak

Stealth with custom user agent

wavexis scrape https://example.com \
    --stealth \
    --user-agent "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36"

Stealth with extra args

wavexis scrape https://example.com \
    --stealth \
    --extra-args "--disable-blink-features=AutomationControlled,--window-size=1920,1080"

Limitations

  • Stealth mode is not a guarantee against all anti-bot systems
  • Advanced bot detection (Cloudflare, Datadome, PerimeterX) may still detect automation
  • CAPTCHA challenges require manual solving or third-party services
  • Stealth patches are browser-specific and may break with browser updates

Scrape Command

Basic scrape

wavexis scrape https://example.com

Returns page content as markdown by default.

Scrape with CSS selector

wavexis scrape https://example.com --selector "article.content"

Scrape with multiple selectors

wavexis scrape https://example.com \
    --selector "h1" \
    --selector ".price" \
    --selector ".description"

Output formats

# Markdown (default)
wavexis scrape https://example.com --format markdown

# HTML
wavexis scrape https://example.com --format html

# Text
wavexis scrape https://example.com --format text

# JSON (structured)
wavexis scrape https://example.com --format json --selector "article"

Scrape with wait

# Wait for a selector to appear
wavexis scrape https://example.com --wait-for ".dynamic-content" --timeout 10000

# Wait for network idle
wavexis scrape https://example.com --wait-until networkidle

Scrape to file

wavexis scrape https://example.com --output result.md

Crawl Command

Crawl an entire site or section by following links.

Basic crawl

wavexis crawl https://example.com --depth 2

Crawl with URL filter

# Only crawl URLs matching a pattern
wavexis crawl https://example.com \
    --depth 3 \
    --url-filter "*/products/*"

Crawl with output directory

wavexis crawl https://example.com \
    --depth 2 \
    --output-dir ./scraped/

Crawl with rate limiting

wavexis crawl https://example.com \
    --depth 3 \
    --delay 2 \
    --concurrent 1

Crawl options

OptionTypeDefaultDescription
--depthint1Maximum crawl depth
--url-filterstrNoneOnly follow URLs matching pattern
--url-excludestrNoneSkip URLs matching pattern
--output-dirstr./scraped/Directory for scraped pages
--delayfloat0Delay between requests (seconds)
--concurrentint1Concurrent requests
--formatstrmarkdownOutput format per page
--stealthflagoffEnable stealth mode
--same-domainflagonOnly crawl same domain

Natural Language Selectors

Use natural language instead of CSS/XPath to describe what you want to extract.

Basic NL selector

wavexis nl https://example.com "the main article title and its publication date"

NL with output format

wavexis nl https://example.com "all product names and prices" --format json

NL with stealth

wavexis nl https://example.com "user reviews with ratings" --stealth --format json

How NL selectors work

  1. The page is scraped and sent to an LLM
  2. The LLM identifies the relevant elements based on the description
  3. The extracted content is returned in the requested format
  4. Requires WAVEXIS_LLM_API_KEY environment variable

NL configuration

export WAVEXIS_LLM_API_KEY="your-api-key"
export WAVEXIS_LLM_MODEL="gpt-4o"
wavexis nl https://example.com "product specifications table"

Shadow DOM Scraping

Scrape content inside Shadow DOM roots that standard selectors can't reach.

Basic shadow scrape

wavexis shadow https://example.com --selector "my-web-component::shadow(.content)"

Shadow with pierce notation

wavexis shadow https://example.com --selector ">>> .shadow-content"

Multiple shadow roots

wavexis shadow https://example.com \
    --selector "my-card::shadow(my-list::shadow(.item))"

Shadow with output

wavexis shadow https://example.com \
    --selector "my-widget::shadow(.data)" \
    --format json \
    --output shadow-data.json

Batch Processing

Process multiple URLs from a file.

Basic batch

wavexis batch urls.txt --format markdown --output-dir ./results/

Batch with stealth

wavexis batch urls.txt --stealth --delay 1 --output-dir ./results/

Batch with selectors

wavexis batch urls.txt --selector "article.content" --format json

URL list format

# urls.txt — one URL per line, # for comments
https://example.com/page1
https://example.com/page2
https://example.com/page3
# This line is a comment
https://example.com/page4

Batch options

OptionTypeDefaultDescription
--formatstrmarkdownOutput format
--output-dirstr./batch-results/Output directory
--delayfloat0Delay between URLs
--concurrentint1Concurrent requests
--stealthflagoffEnable stealth mode
--selectorstrNoneCSS selector to extract
--timeoutint30000Per-URL timeout (ms)

Auth Context

Scrape pages behind authentication by reusing a browser session.

Login then scrape

# Step 1: Login and save session
wavexis navigate https://example.com/login
wavexis fill "#username" "myuser"
wavexis fill "#password" "mypass"
wavexis click "#login-button"
wavexis session save --name authenticated

# Step 2: Scrape with saved session
wavexis scrape https://example.com/dashboard --session authenticated

Auth with multi-action YAML

# auth-scrape.yml
actions:
  - navigate:
      url: https://example.com/login
      wait_until: networkidle
  - fill:
      selector: "#username"
      text: "myuser"
  - fill:
      selector: "#password"
      text: "mypass"
  - click:
      selector: "#login-button"
  - wait_for:
      selector: ".dashboard"
      visible: true
      timeout: 10000
  - scrape:
      format: markdown
      selector: ".dashboard-content"
wavexis run auth-scrape.yml --output dashboard.md

Cookie-based auth

# Export cookies from an authenticated session
wavexis cookies export --output cookies.json

# Use cookies for scraping
wavexis scrape https://example.com/private --cookies cookies.json

Action Caching

Avoid re-analyzing pages you've already scraped.

Cache with TTL

wavexis scrape https://example.com --cache-ttl 3600

Cache directory

wavexis scrape https://example.com --cache-dir ./cache/

Clear cache

wavexis cache clear

Cache behavior

  • Cached pages are stored as HTML in the cache directory
  • --cache-ttl specifies seconds before re-fetch (default: 3600)
  • Cache key is based on URL + selector + format
  • Stealth mode bypasses cache by default

Rate Limiting and Polite Crawling

Delay between requests

wavexis crawl https://example.com --depth 3 --delay 2

Concurrent request limit

wavexis crawl https://example.com --depth 3 --concurrent 2 --delay 1

Respect robots.txt

wavexis crawl https://example.com --depth 3 --respect-robots

Polite crawling best practices

  • Use --delay of at least 1-2 seconds between requests
  • Keep --concurrent low (1-2) to avoid overwhelming the server
  • Use --respect-robots to honor robots.txt
  • Set a reasonable --timeout (30s default)
  • Use --url-exclude to skip non-content pages (e.g., /print/, /share/)
  • Limit --depth to avoid crawling too deep

Multi-Action YAML for Scraping

SPA scraping template

actions:
  - navigate:
      url: https://spa.example.com
      wait_until: networkidle
  - wait_for:
      selector: ".app-loaded"
      visible: true
      timeout: 15000
  - scrape:
      format: markdown
      selector: "main"

Infinite scroll scraping

actions:
  - navigate:
      url: https://example.com/feed
      wait_until: networkidle
  - repeat:
      times: 5
      actions:
        - scroll:
            delta_y: 1000
        - wait:
            duration: 2000
  - scrape:
      format: json
      selector: ".post"

Paginated scraping

actions:
  - navigate:
      url: https://example.com/products?page=1
      wait_until: networkidle
  - scrape:
      format: json
      selector: ".product"
      output: page-1.json
  - click:
      selector: ".next-page"
  - wait_for:
      selector: ".product-list"
      visible: true
  - scrape:
      format: json
      selector: ".product"
      output: page-2.json

Best Practices

  • Use stealth only when needed — adds overhead; skip for sites without anti-bot.
  • Cache aggressively — --cache-ttl avoids redundant requests during development.
  • Be polite — use --delay and low --concurrent to avoid rate limiting.
  • Use specific selectors — article.content is better than scraping the whole page.
  • Wait for content — use --wait-for for dynamic content before scraping.
  • Use YAML for complex flows — multi-action YAML handles login + scrape in one run.
  • Export to JSON for data — structured output is easier to process downstream.
  • Test with --depth 1 — verify crawl config before running deep crawls.
  • Save sessions for auth — reuse authenticated sessions across multiple scrapes.
  • Use --url-filter — restrict crawls to relevant sections of the site.

Common Pitfalls

  • Forgetting --wait-for — dynamic content may not be present when scraping starts.
  • Stealth not enough — advanced anti-bot may still detect; consider proxy services.
  • Crawling too fast — servers may rate-limit or block; use --delay.
  • Missing --same-domain — crawling may follow external links; enabled by default.
  • Shadow DOM invisible — standard CSS selectors can't pierce shadow roots; use shadow command.
  • NL requires API key — natural language selectors need WAVEXIS_LLM_API_KEY.
  • Cache stale data — long --cache-ttl may serve outdated content for dynamic sites.
  • Auth session expired — saved sessions may expire; re-login if scraping fails.

References

  • references/stealth-techniques.md — What stealth mode does and limitations
  • references/selector-strategies.md — CSS, XPath, NL, Shadow DOM selectors
  • references/crawl-patterns.md — Crawling strategies and rate limiting
  • assets/templates/scrape-spa.yml — SPA scraping template
  • assets/templates/crawl-site.yml — Site crawl template
  • assets/templates/stealth-scrape.yml — Stealth scraping template
  • assets/templates/batch-urls.txt — Batch URL list template
  • wavexis on GitHub
  • wavexis documentation

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.