docpa
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

Docpa

A simple library that I use for web scraping. Uses htmlparser2 to parse dom.

Usage

const Docpa = require("docpa")

const doc = new Docpa(`<html>...</html>`)

// Available methods/properties
doc.getAttribute
doc.hasAttribute
doc.querySelector
doc.querySelectorAll
doc.parentElement
doc.prevSibling
doc.nextSibling
doc.className
doc.classList
doc.tagName
doc.id
doc.innerText
doc.textContent
doc.innerHTML
doc.outerHTML
doc.children
doc.firstChild
doc.lastChild

License

MIT

Package Sidebar

Install

npm i docpa

Weekly Downloads

160

Version

1.0.1

License

MIT

Unpacked Size

9.26 kB

Total Files

5

Last publish

Collaborators

  • coderosh