Puppeteer icon

Puppeteer

Automate browser interactions using Puppeteer

Overview

This node uses Puppeteer to interact with web pages programmatically. Specifically, the 'Get Screenshot' operation captures a screenshot of a given URL, supporting various image formats (PNG, JPEG, WebP), quality settings, and options like full-page capture. It is useful for automating website monitoring, generating visual reports, or archiving web content as images.

Use Case Examples

  1. Capture a screenshot of a product page to monitor visual changes over time.
  2. Generate thumbnails of web pages for a website preview gallery.
  3. Automate capturing screenshots of error pages for debugging purposes.

Properties

Name Meaning
URL The web page URL to capture the screenshot from.
Property Name The name of the binary property where the screenshot image data will be stored.
Type The image format for the screenshot (PNG, JPEG, or WebP).
Quality The quality of the image (0-100), applicable only for JPEG and WebP formats.
Full Page Whether to capture the entire scrollable page or just the viewport.
Query Parameters Additional query parameters to append to the URL when loading the page.
Options Various Puppeteer launch and page options such as batch size, browser endpoint, device emulation, headers, file name, launch arguments, timeout, caching, headless mode, stealth mode, proxy server, and container arguments.

Output

Binary

Contains the screenshot image data in the specified binary property.

JSON

  • headers - HTTP response headers from the page request.
  • statusCode - HTTP status code of the page request.
  • url - The final URL of the page after any redirects.

Dependencies

  • Requires Puppeteer and puppeteer-extra with stealth plugin for browser automation.

Troubleshooting

  • Common issues include invalid URLs causing navigation failures, which result in errors with HTTP status codes. Ensure URLs are valid and accessible.
  • Browser launch failures may occur due to incorrect executable paths or missing dependencies; verify the browser installation and path settings.
  • Timeouts can happen if the page takes too long to load; adjust the timeout option accordingly.
  • Stealth mode may not work perfectly on all sites; disable if detection issues arise.

Links

Discussion