Storm Package: synapse-playwright

The following Commands are available from this package. This documentation is generated for version 1.24.0 of the package.

Storm Commands

This package implements the following Storm Commands.

playwright.setup.proxy

Setup an HTTP(S) or SOCKS5 proxy to use with Playwright.

Examples:

  // Set with only the server URL
  playwright.setup.proxy http://mycoolproxy:8080

  // Include username and password
  playwright.setup.proxy http://mycoolproxy:8080 --username user --password pwd

  // Display the current proxy setting
  playwright.setup.proxy --show-proxy

  // Remove the global proxy setting
  playwright.setup.proxy --remove


Usage: playwright.setup.proxy [options] <server>

Options:

  --help                      : Display the command usage.
  --username <username>       : The username for the proxy.
  --password <password>       : The password for the proxy.
  --show-proxy                : Display the proxy key value (requires admin permissions).
  --remove                    : Remove the configured proxy.

Arguments:

  [server]                    : The proxy URL.

playwright.wget2pdf

Load a page from a URL and save the generated PDF file to the Axon and the Cortex.

The DOM is first downloaded and saved, and an it:exec:url node provides
the linkage with the generated PDF. If the DOM already exists with a generated
PDF then that inet:urlfile is returned, since each time a PDF is generated the hash will
change as the timestamp is part of the metadata.  The --force option can be used to
always generate a live PDF.

The --norm option will apply the following changes to the page before generating the PDF:
  - Set viewport WxH to 2560x1440
  - Add custom CSS to improve the capture
  - Scrub fonts that will not render properly
  - Scroll the document to load additional content
  - Consume a subset of cookies
  - Remove fixed DOM elements

Examples:

  // Yield the created inet:urlfile representing the PDF
  inet:url#my.url | playwright.wget2pdf --yield --norm

  // Manually provide URL
  playwright.wget2pdf "https://vertex.link" --norm

  // Override the default timeout value
  inet:url#my.url | playwright.wget2pdf --timeout 60 --norm

  // Force generate the PDF even if it already exists
  inet:url#my.url | playwright.wget2pdf --force --norm

  // Show debug output, including the raw page response
  inet:url#my.url | playwright.wget2pdf --debug --norm


Usage: playwright.wget2pdf [options] <urls>

Options:

  --help                      : Display the command usage.
  --debug                     : Enable debug logging message.
  --timeout <timeout>         : The time to wait for each Playwright operation to complete.
  --yield                     : Yield the newly created inet:urlfile node.
  --force                     : Force PDF generation even if it already exists.
  --norm                      : Normalize the page to optimize the PDF representation.

Arguments:

  [<urls> ...]                : URLs to download.

Storm Modules

This package does not export any Storm APIs.