Skip to content

It's a wrapper to make it easy to do crawling webpage

License

Notifications You must be signed in to change notification settings

allanbian1017/supercheer

Repository files navigation

supercheer

CircleCIView on NPM View on NPM

supercheer is a wrapper, wrapping superagent and cheerio, make it easy to do crawling webpage.

Setup

Install:

npm install supercheer --save

Usage

supercheer.query( url, selectors, transform )

const supercheer = require('supercheer');

const r = await supercheer.query(
  'https://www.google.com/',
  {
    title: 'title',
    firstChar: 'title',
  },
  {
    firstChar: (v) => v.slice(0, 1),
  }
);

// {
//   title: 'Google',
//   firstChar: 'G',
// }
console.log(r);

License

MIT. See LICENSE for details.

About

It's a wrapper to make it easy to do crawling webpage

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published