cheerio-req
An http request module sending back a Cheerio object.
βοΈ Installation
$ npm i --save cheerio-req
π Example
const cheerioReq = require("cheerio-req");
cheerioReq("http://ionicabizau.net", (err, $) => {
let $links = $("a.article-title");
for (let i = 0; i < $links.length; ++i) {
console.log($links.eq(i).text());
}
// =>
// Pi Day, Raspberry Pi and Command Line
// How I ported Memory Blocks to modern web
// How to convert JSON to Markdown using json2md
});
π Documentation
cheerioReq(opts, cb)
An http request module sending back a Cheerio object.
You can change the request
function by overriding the request
field.
Params
- Object|String
opts
: The request url or an object passed totinyrequest
. - Function
cb
: The callback function.
Return
- Request The
tinyrequest
object.
π How to contribute
Have an idea? Found a bug? See how to contribute.
π° Donations
Another way to support the development of my open-source modules is
to set up a recurring donation, via Patreon.
PayPal donations are appreciated too! Each dollar helps.
Thanks! β€οΈ
π« Where is this library used?
If you are using this library in one of your projects, add it in this list.
scrape-it
βA Node.js scraper for humans.