0.1.1 • Published 3 years ago
supercheer v0.1.1
supercheer
supercheer is a wrapper, wrapping superagent and cheerio, make it easy to do crawling webpage.
Setup
Install:
npm install supercheer --save
Usage
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.