@ghom/web-scrapper
v1.0.2
Published
Simple web scrapper using query selectors
Downloads
20
Readme
Javascript utils
Install
npm install @ghom/web-scrapper
Usage
import { scrap } from '@ghom/web-scrapper'
// with callback
scrap("https://www.google.com", null, (data, err) => {
if (err) return console.error(err)
console.log(data.window.document.querySelector("title").innerHTML)
})
// with promise
const data = await scrap("https://www.google.com")
console.log(data.window.document.querySelector("title").innerHTML)