Skip to content

inbn/screenshot-urls

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

Screenshot URLs script

A node script to take screenshots of webpages using puppeteer.

Installation

Run npm install or yarn install

Generating screenshots

node index.js [--url <url>] [--input <path>] [-dest <path>] [--width <pixels>] [--height <pixels>] [--format <format>] [--wait <milliseconds>]

Single

To generate a single screenshot, the only required argument is URL. The output filename can be automatically generated.

e.g.

node index.js --url="https://www.google.com/" --width=1600 --height=900

will generate a screenshot with the dimensions 1600 by 900 pixels inside the ./output folder. The auto-generated filename contains of a timestamp and sluggified version of the URL.

Bulk

Make a text file with each URL separated by a new line.

e.g.

https://www.google.com
https://www.bing.com

then give the command the path to the input file:

node index.js --input=pages.txt

About

A node script to take screenshots of webpages using puppeteer.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published