0.0.0-alpha.4 • Published 1 year ago

@pingid/shears v0.0.0-alpha.4

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Shears

A Declarative web scraping library that aims to provide an extendable set of tools for building complex typesafe queries and web crawlers.

import * as sh from 'shears'

const article_list = sh.query(
  '#content',
  ['ul > li'],
  sh.query({
    title: 'h1',
    image: 'image@src'
  })
)

await sh.run('<html><...', article_list)
// [{ title: '...' content: '...' },{...]