inspect command fetches and analyzes a website to help you understand its structure and build scraper configurations. It supports three modes: lightweight HTTP, browser-based (for JavaScript sites), and Cloudflare bypass.
inspect
Inspect a website URL.Syntax
Arguments
Website URL to inspect.
Options
Project name (used for saving analysis files).
Directory to save analysis files. Defaults to
data/<project>/inspect/.Proxy type:
none, static, residential, auto.Do not save the full HTML to disk.
Use browser automation for JavaScript-rendered sites and Cloudflare bypass. Automatically handles browser challenges and renders dynamic content.
Logging level:
debug, info, warning, error, critical.Path to log file.
Modes
HTTP Mode (Default)
Lightweight HTTP fetch with requests library:- Simple websites with server-side rendering
- Static HTML sites
- Fastest inspection method
Browser Mode
Use Playwright for JavaScript-heavy sites:- Single-page applications (React, Vue, Angular)
- Sites with JavaScript-rendered content
- Dynamic content loading
Browser mode waits for JavaScript to execute and renders the final DOM. This is the HTML you should analyze for extraction selectors.
- Automatic Cloudflare challenge detection and bypass
- Cookie extraction for session persistence
- Browser fingerprinting resistance
Saved Files
Inspection saves files todata/<project>/inspect/<domain>/:
page.html
Full HTML content:- HTTP mode: Raw HTML from server
- Browser mode: Rendered HTML after JavaScript execution
analyze command to discover CSS selectors.
metadata.json
Request metadata:cookies.json (Browser mode with Cloudflare)
Cloudflare session cookies:screenshot.png (Browser mode)
Full-page screenshot for visual verification.Proxy Support
Specify proxy type for inspection:.env.
Skip HTML Saving
For quick inspection without saving files:Logging
Control logging verbosity:analyze
Analyze saved HTML for CSS selector discovery (separate command, not a subcommand of inspect).Syntax
Arguments
Path to HTML file to analyze.
Options
Test a specific CSS selector.
Find elements by keyword (searches classes and IDs).
Examples
Output (Analysis Mode)
Test a Selector
Find by Keyword
extract-urls
Extract all URLs from a saved HTML file. Useful for understanding URL patterns on a site during analysis.Syntax
Arguments
Path to HTML file to extract URLs from.
Options
Output file path. If not specified, URLs are printed to console.
Short form of
--output.Examples
Output
--output, URLs are written one per line to the specified file:
Workflow: Inspect to Spider Config
1. Inspect the Site
2. Extract URLs (Optional)
3. Analyze HTML Structure
4. Test Selectors
5. Create Spider Config
Writespider.json using discovered selectors:
6. Import and Test
Platform Notes
macOS/Windows
Browser mode uses native display automatically (no xvfb needed).Linux (Headless Servers)
Browser automation requires xvfb (covered in Browser Mode section above).Troubleshooting
Browser Launch Failed
Invalid URL
Next Steps
Spider Management
Import your spider configuration
Crawl Commands
Test your spider with a crawl