README
Venom
Getting Started
Installation
npm i venom
# or "yarn add venom"
Usage
1. Define a class
const Venom = require('venom');
class Example extends Venom {
urls = [
'https://example.com',
]
parse() {
const title = this.$('h1')
console.log(title)
}
join_urls() {
return this.$('a').attr('href')
}
}
2. Start
const puppeteer = require('puppeteer')
(async () => {
const broser = await puppeteer.launch()
const example = new Example()
await example.start(broser)
})()