Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/coderosh/docpa
- Owner: coderosh
- License: mit
- Created: 2022-01-14T13:13:36.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-01-14T15:58:56.000Z (about 3 years ago)
- Last Synced: 2024-04-25T10:02:56.531Z (10 months ago)
- Topics: docpa, document-parser, dom, html-parser
- Language: TypeScript
- Homepage: https://npm.im/docpa
- Size: 69.3 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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