ven0m

npm i venom

Usage no npm install needed!

<script type="module">
  import ven0m from 'https://cdn.skypack.dev/ven0m';
</script>

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)
})()