1.0.0 • Published 5 years ago

mailchimp-letters-scrapper v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

MailChimp letters scrapper

A small package that downloads emails created by MailChimp and saves their content (markup and images) to a directory.

Example

const path = require('path');
const scrap = require('mailchimp-letters-scrapper');

const BASEPATH = 'http://example.com/images/';
const RESULT_DIR = path.resolve(__dirname, './letters');
const URL = 'http://eepurl.com/dmsYyv';
const ID = 'butt';

scrap({
  basepath: BASEPATH,
  dir: RESULT_DIR,
  pages: {
    id: ID,
    url: URL,
  }
})

Parameters

There are three parameters in example above:

  • basepath, a string that is used for appending paths to images in email's markup;
  • dir, a path to result directory, where you need to save downloaded letters;
  • pages, an array of objects (or just an object) that contain id and url, where id is an unique ID of a letter, and url is an URL for the letter.

See tests for more information.

1.0.0

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.0

5 years ago