moonshot

Screenshots of web with Selenium.

Usage no npm install needed!

<script type="module">
  import moonshot from 'https://cdn.skypack.dev/moonshot';
</script>

README

moonshot

Screenshots of web with Selenium.

Just specify a list websites to capture, and at which window resolutions for each. Full-page screenshots are supported.

Etymology: Moonshot uses Selenium to take screenshots. The eponymous word selenium comes from the Greek selēnē (σελήνη) meaning moon. Hence moonshot, a word which also means a project proposing a radical solution to a huge problem using breakthrough technology.1

There are many tools based purely on PhantomJS (html2png, pageres), which unfortunately hasn't been great at rendering web fonts. By using Selenium, we can get screenshots from any supported browser that look exactly as they would appear to real users.

Install

npm i --save moonshot

Use

var moonshot = require('moonshot');
moonshot([
 ['google.com', [
   // a couple of ways to specify resolutions:
   [1280,800], '800x600', /* width only */ '320', {width: 1024, height: 768}
 ]],
 ['andrz.me', [ /* ... */ ] ]
]);