DomainPunch Logo

 A Service of Softnik Technologies

Webshots and Cookie Analysis

Watch My Domains SED can capture website screenshots and collect cookies using a Node.js script called websites.js. This script uses Puppeteer to control Chromium in the background, open a web page, save a screenshot, and write cookie data for later review inside WMD SED.

To use this feature, you need Node.js, the required npm packages, and a dedicated Node.js working folder on the same computer where Watch My Domains SED is installed.


Node.js Working Folder

WMD SED website tools use a dedicated Node.js working folder. This folder holds the installed npm packages and the runtime script websites.js.

Use one folder for this purpose and keep all related website-tool packages there. If your installation already uses Node.js and Puppeteer for WMD SED website tools, reuse that same folder.


Install Node.js

Install a current stable version of Node.js on the same system where WMD SED is running.

After installation, confirm it is available from the command line:

node -v
npm -v

Install the Required Packages

Open a command prompt or terminal, create or choose the Node.js working folder, change into it, and install the required packages there.

Linux Example

mkdir /path/to/webdata
cd /path/to/webdata
npm install puppeteer
npm install minimist
npm install timers-promises

Windows Example

mkdir C:\path\to\webdata
cd /d C:\path\to\webdata
npm install puppeteer
npm install minimist
npm install timers-promises

Run these commands from inside the Node.js working folder so all required packages are installed in the same environment used by websites.js.


Place websites.js in the Working Folder

Copy websites.js from the Watch My Domains SED application into the Node.js working folder where the required npm packages were installed.

In standard installations, the source file is:

lib/js/websites.js

The Debian installation script copies this file into the Node.js working folder as part of setup. On Windows or other manual installations, follow the same approach and copy lib/js/websites.js into the working folder yourself.

The script uses:

When run successfully, it creates screenshots in a webshots folder and cookie data in a cookies folder under the same working directory.


Test the Script

Once websites.js is in place, test it directly from the command line.

node websites.js -u https://example.com

If everything is set up correctly, the script should create:

The script also supports some optional flags for specific environments:

Example:

node websites.js -u https://example.com --nosb

Linux Notes

On Linux, some environments may require additional system libraries for Chromium or Puppeteer. Modern WMD SED installations usually handle this as part of the server setup, but if Puppeteer reports missing shared libraries, install the missing packages required by your distribution.

Recent Debian-based WMD SED installations typically use a dedicated working folder and install Puppeteer and related packages there as part of setup. The webshots feature should follow that same model.


Windows Notes

On Windows, the same general strategy applies:

If your Windows installation already uses Puppeteer-based WMD SED website tools, use the same Node.js working folder for webshots and cookie analysis.


Connect the Working Folder to WMD SED

WMD SED expects a folder named websites under its log area. That location should point to the Node.js working folder containing websites.js and the installed npm packages.

You can find the log folder location from the WMD SED verify page:

https://yourinstalllocation/verify.php

Linux / Mac

ln -s /path/to/the/node-working-folder websites

Windows

mklink /D websites "C:\path\to\the\node-working-folder"

Use the appropriate logs folder location for your installation before creating the link.


Configure Webshots in WMD SED

Once the working folder is connected and the script test succeeds, WMD SED is ready to use webshot generation and cookie analysis.

Close