/medusa

screenshot tool

Primary LanguageJavaScript

Medusa

A tool that takes screenshots of multiple web sites kinda fast. Basically a nicer wrapper for webshot-factory, which in turn is relying on chrome headless. Designed for new york magazine sites (the tool is expecting a certain url schema).

How to use

  • add some urls to examples.txt or a different textfile. It doesn't need to have to be .txt! All that is required is that each url you want to take a screenshot of is on its own line. Just make sure you point this tool to the correct file in config.js
  • configure the tool to your liking via config.js. You can figure the name of the folder where you're saving screenshots, the text file you want to use, and settings for webshot-factory.
  • run npm install
  • run node index.js

Medusa will use the slug name (sans date) as the file name. So if you're taking a screenshot of http://www.vulture.com/2018/03/tag-trailer-jon-hamm-jake-johnson-ed-helms-hit-each-other.html, the filename of the screenshot will be tag-trailer-jon-hamm-jake-johnson-ed-helms-hit-each-other.png.

Use cases

  • quick visual qa of multiple pages
  • checking that ads are loading on multiple pages

WARNINGS

  • if you're using a different url scheme than site-date-articleslug, the tool will error out
  • I've tried setting concurrency to 10, which led to memory leak errors but maybe you'll have better luck?? (-Amy)
  • the tool will take a screenshot of the ENTIRE height of the page, this might to lead to images that are several mb big

Roadmap

  • visual diffing!!!
  • stdin maybe???
  • accepting urls with different schemas than what is on New York Magazine
  • accepting evergreen urls