1.0.2 • Published 4 years ago

get-all-links v1.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

get-all-links

Fetch all links of website from one point of website with depth control

Example:

const {Spider} = require('get-all-links')
const getAllLinks  = new Spider({
    depth: 3,
    url : "http://example.com/",
    onSuccess : console.log,
    onFailure : console.log,
    onFinsh : (data) => console.log(data) 
})

getAllLinks.crawl()

Options

ParameterRequiredFunctionality
depthNOlevel of pages it goes inside the website from starting point Default 2
urlYESStarting point
onSuccessNocallback on every link fetched with url as parameter,
onFailureNocallback on error for specific link, retruns error object
onFinshYEScallback on finsh.

If you find this project useful, please star on github

GitHub stars