navegador-headless
Headless Chromium runner for dumping rendered DOM and capturing full-page screenshots.
What it does
Scraping dynamic web content or generating visual captures from command-line workflows is difficult when pages rely on JavaScript rendering. navegador-headless runs a headless Alpine Chromium browser inside a throwaway Docker container to load public web pages without any graphical interface. It provides two focused capabilities: dumping the fully rendered DOM after JavaScript execution and capturing high-resolution 1280x1600 page screenshots to disk. Designed strictly for public unauthenticated pages, it eliminates complex browser management while maintaining execution timeouts and shared memory safeguards.
- Renders dynamic web pages and dumps the finalized DOM to standard output.
- Captures 1280x1600 PNG screenshots of web pages directly to disk.
- Runs inside a throwaway Docker container (Alpine Chromium), so nothing is installed on the host.
- Enforces execution timeouts to prevent hanging background browser processes.
Commands
| Command | What it does |
|---|---|
navegador-headless texto https://example.com | Prints the fully rendered HTML DOM after client-side scripts execute. |
navegador-headless captura https://example.com screenshot.png | Saves a 1280x1600 screenshot of the specified webpage to an image file. |
Design principles
- Unauthenticated scope: intentionally restricted to public pages without saved login sessions.
- Resource containment: uses explicit shared memory allocation and execution timeouts to prevent process hangs.
Built with
BashDockerAlpine LinuxChromium
Works with
Public web pages