Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/coderosh/docpa

A simple library that I use for web scraping. Uses htmlparser2 to parse dom.
https://github.com/coderosh/docpa

docpa document-parser dom html-parser

Last synced: 2 months ago
JSON representation

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

Awesome Lists containing this project

README

        

# Docpa

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

### Usage

```js
const Docpa = require("docpa")

const doc = new Docpa(`...`)

// 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