npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

node-red-contrib-web-page-screenshot

v0.2.2

Published

A Node-RED node for taking screenshots of web pages.

Readme

node-red-contrib-web-page-screenshot

A Node-RED node for taking screenshots of web pages, and this is my fav GYOUZA(dumpling).

ポキオ Node-RED スクリーンショット puppeteer

Install

cd ~/.node-red
npm install node-red-contrib-web-page-screenshot

Usage

  • If this node is triggered, this node will take a screenshot of the configured web page in setting screen.
  • This node takes a screenshot as PNG image, and encodes with base64.
  • The base64 string will be returned.

Settings

In setting menu, there are some items like below.

ポキオ Node-RED スクリーンショット puppeteer

Name (Optional)

You can set any name to the node. Blank is allowed.

Web Page URL (Optional)

URL which you want to take a screenshot. If blank, this node will take a screenshot of http://example.com .

executablePath (Optional)

You can specify chromium/chrome executable with the path. For those who use x86 arch, this can be blank, however, if you use this node on ARM arch (e.g. Raspberry Pi), you have to install headless-mode-available chromium-browser and set the path.

Fortunately, Raspbian OS (as of ver. April 2019) includes compatible chromium-browser, so just set /usr/bin/chromium-browser to this blank.

[UPDATED] Class Name (only in screenshot-class node)

For partial screenshots, you can specify a class name of element you want to take screenshots. If blank, a whole screenshot will be taken.

[UPDATED] ID Name (only in screenshot-id node)

For partial screenshots, you can specify a ID name of element you want to take screenshots. If blank, a whole screenshot will be taken.

Example

This flow provides a web page with a screenshot of a configured URL.

ポキオ Node-RED スクリーンショット puppeteer

[{"id":"67c61941.053d58","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"2660a5a5.ba220a","type":"http in","z":"67c61941.053d58","name":"","url":"/test","method":"get","upload":false,"swaggerDoc":"","x":180,"y":140,"wires":[["2fe6f48.ec2f80c"]]},{"id":"2fe6f48.ec2f80c","type":"screenshot","z":"67c61941.053d58","name":"","url":"https://relativelayout.hatenablog.com/","x":300,"y":200,"wires":[["86463a3a.b78058"]]},{"id":"86463a3a.b78058","type":"template","z":"67c61941.053d58","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"<html>\n    <body>\n        <img src=\"data:image/png;base64,{{payload}}\">\n    </body>\n</html>","output":"str","x":420,"y":260,"wires":[["769165e4.dc545c"]]},{"id":"769165e4.dc545c","type":"http response","z":"67c61941.053d58","name":"","statusCode":"","headers":{},"x":520,"y":320,"wires":[]}]

A point is, in HTML string of HTTP response, the base64 string is included like following.

<html><body><img src=\"data:image/png;base64,{{payload}}\"></body></html>

If you access the endpoint...

ポキオ Node-RED スクリーンショット puppeteer

You can see the screenshot on a web page.

Details and Issues

  • This node uses puppeteer for taking screenshots.