A Node utility to watch and notify website changes
- Watch list
- POST & GET webhooks
- Configurable tokens in body
- Configurable tokens in url
- Threshold settings
- Text/HTML settings
$ git clone
$ yarn
You can run the script manually, but it was intended to be used as part of a cron task. The process exits once every entry has been checked and prevents multiple watcher process from being launched.
$ node index.js
As an accomodation, you can also use the watch.js
script, which perform checks once every 60 seconds.
$ node watch.js
Configuration takes place in a config.json
file in the root folder.
You can use this type to help you build it:
type Config = {
browser: {
name: 'chrome' | 'firefox',
binary?: string,
args?: string[]
},
watchlist: [
{
name?: string,
url: string,
selector?: string,
json?: boolean,
webhook?: {
method: 'POST' | 'GET',
url: string,
body?: string,
headers?: { [string]: string }
}
}
]
}
Tokens can be used in webhook body string to send entry-specific parameters.
Token | Description |
---|---|
{{name}} |
The entry name |
{{url}} |
The entry URL |
{{diff}} |
A textual diff of line changes |