cheerio-spider
v0.0.4
Published
> A static page grabbing tool that encapsulates cherio, Axios and tunnel.
Downloads
10
Readme
Intro
A static page grabbing tool that encapsulates cherio, Axios and tunnel.
Usage
How to use?
Basic
const CheerioSpider = require('cheerio-spider')
const spider = new CheerioSpider({
baseURL: 'https://example.com/'
})
;(async () => {
const html = await spider.load(null, $ => $('body > div:nth-child(1)').html())
console.log(html)
})()
Proxy
const spider = new CheerioSpider({
baseURL: 'https://example.com/',
proxy: {
host: '127.0.0.1',
port: 9527
}
})