3.2.2 • Published 2 years ago
web-monitoring v3.2.2
web-monitoring
Web-monitoring is a small web page monitoring lib written in node.js, you can monitor changing of a web page. Compatible with Node v14.0.0 and above.
App
How to install
npm install web-monitoring --save
How To Use
var options =
{
whileControl: Function, // function called when lapse expired. if returns true, the event 'alert' will be call.
lapse: Number, // lapse time in ms.
percentageDiff: Number, // percentage difference that is needed to call 'alert' event. This option does not need if whileControl function is set.
got: Object // Got options
}
Example:
var wm = require('web-monitoring')
var options =
{
whileControl: (oldPage,newPage) => oldPage === newPage,
lapse: 5000
}
var wp = wm.monitor('http://www.google.com', options)
.start()
.on('start', (url) => console.log(`monitoring of '${url}' start`))
.on('alert', (url,page) => {
console.log('page changed')
wp.stop()
})
.on('check', (oldPage, newPage) => {
})
.on('error', (err) => console.log(error))
Example:
var wm = require('web-monitoring')
var options =
{
lapse: 5000,
percentageDiff: 0.1,
}
var wp = wm.monitor('http://www.google.com', options)
.start()
.on('start', (url) => console.log(`monitoring of '${url}' start`))
.on('alert', (url,page) => {
console.log('page changed')
wp.stop()
})
.on('check', (oldPage, newPage) => {
})
.on('error', (err) => console.log(error))
Allert will be called when oldPage is different from newPage of 0.1.
Authors
- Antonio Musolino - antoniomuso
License
This project is licensed under the MIT License - see the LICENSE file for details
3.2.2
2 years ago
3.2.1
2 years ago
3.2.0
2 years ago
3.1.0
2 years ago
3.0.1
3 years ago
3.0.0
3 years ago
2.1.0
6 years ago
2.0.1
6 years ago
2.0.0
6 years ago
1.2.13
6 years ago
1.2.12
6 years ago
1.2.11
7 years ago
1.2.10
7 years ago
1.2.9
7 years ago
1.2.8
7 years ago
1.2.7
7 years ago
1.2.6
7 years ago
1.2.5
7 years ago
1.2.4
7 years ago
1.2.3
7 years ago
1.2.2
7 years ago
1.2.1
7 years ago
1.2.0
7 years ago
1.1.0
7 years ago
1.0.1
7 years ago
1.0.0
7 years ago