Web scraping using shot-scraper. Read web pages, extract content, interact with websites.
npm install -g @sdjz/pup
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
pup goto https://example.com # Open page
pup scan --no-empty # Scan elements, get IDs
pup click 5 # Click element by ID
pup type 3 "hello" --enter # Type and press Enter
pup goto <url> # Open URL
pup back / forward # History
pup reload # Reload
pup scroll <up|down|top|bottom> # Scroll
pup wait <ms> # Wait
pup scan --no-empty --limit 30 # Scan viewport elements
pup find <text> # Find by text
pup click <id> # Click element
pup click <id> --js # JS click (for modals)
pup type <id> <text> --enter # Type + Enter
pup hover <id> # Mouse hover
pup select <id> <option> # Select dropdown
pup tabs # List tabs
pup tab <id> # Switch tab
pup newtab [url] # New tab
pup close # Close current
pup network --capture # Enable XHR capture
pup cookies # View cookies
pup storage # View localStorage
pup exec <js> # Execute JavaScript
pup screenshot [file] # Take screenshot
pup perf # Quick Web Vitals
pup perf-network # Network waterfall
pup perf-memory # Memory analysis
1. pup goto https://example.com
2. pup scan --no-empty # Get element IDs
3. LLM decides: click element 5
4. pup click 5
5. pup scan --no-empty # Check result
6. ...loop
pup scan --json # JSON output