Takes screenshots of web pages for the list of URLs. Various resolutions, multiple formats (JPG, PDF, PNG and TXT)
ee.Screen allows to take screenshots of web pages according to a list of URLs. The script supports various resolutions and several formats - JPG, PDF, PNG and TXT. Also, headless mode allows to use very high resolutions, such as 5000*5000 pixels. This can be useful, for example, if you need to take a large screenshot from Google Maps.
ee.Screen uses NodeJS and Google Chrome Puppeteer. To install NodeJS, visit nodejs.org. To install Puppeteer, after NodeJS is installed, open a Windows Command Prompt and type
npm install --save puppeteer
The common way to use the script is to run it from the Windows Command Prompt with the path to the URL list file as an argument:
node "c:\path\to\ee.screen.js" "c:\path\to\list\file.txt"
The line has the following format:
url,width*height,output
Quotes are only needed if the field contains a comma. The order of the fields in the line does not matter. For example:
"https://news.sky.com/world",1280*1024,"D:\My files\screenshot01.jpg"
The url
is the only required parameter, it must start with the prefix http://
or https://
To take a screenshot at full page height, replace the height value with the word full
. If the resolution field is missed, the script uses the default 1280*full
The output
field specifies the folder, filename and extension. It can be specified partially, then the missing parts are replaced with default values. In this case, the part of the string to the right of the last slash is interpreted as a filename and/or extension. If the field does not contain slashes, it’s fully interpreted as filename and/or extension. The folder and filename supports renaming masks *flatUrl*
, *pageTitle*
, *width*
, *height*
and custom datetime that recognizes letters YMDhms (for example, *YYYY-MM-DD hh.mm.ss*
). The extension can contain several formats, for example jpg+pdf+png+txt
. To take PDF screenshot in landscape orientation, specify the extension as lpdf
instead of pdf
. If the output
field is missing, the script uses the default \screenshots\*flatUrl*.png
To take PNG screenshot, 1280p width and full page height, save as \screenshots\https_news.sky.com_world.png:
https://news.sky.com/world
To take JPG and PDF screenshots, 1280p width and full page height, save as \20210101\https_news.sky.com_world.jpg and \20210101\https_news.sky.com_world.pdf:
https://news.sky.com/world,"*YYYYMMDD*\.jpg+pdf"
To take PNG screenshot, 1024p width and 768p height, save as D:\My files\new screenshot.png:
https://news.sky.com/world,1024*768,"D:\My files\new screenshot"
automated batch bulk jpg list multiple pdf png screenshots snapshots text txt url webpages
Takes screenshots of web pages according to a list of URLs. Supports various resolutions and several formats - JPG, PDF, PNG and TXT