A node script that pings our university website and notifies us about changes.
-
Prerequisites
- nodejs
- git
Install these using your favourite package manager if they aren’t present on your system.
-
Clone the repository
git clone https://github.com/mountAP/pappuPinger
-
Move to the cloned folder
cd pappuPinger
-
Install dependencies
npm install
node pinger.js
- For 3600000 ms, the check is performed once every hour. Feel free to set it to any value. However, values below 2000 ms are not recommended.
- Rest will be self explanatory. Don’t worry.
You need not bother about connection drops, terminal crashes or device restarts. We’ve got you covered. Once started, Pinger saves a local copy of the website and compares it with the latest version in subsequent checks after restarts or network connection resets. So no change goes unnoticed regardless of whether or not you were offline for some period.
Just restart the script using node pinger.js
inside the pappuPinger
directory.
You get a system notification when a change occurs, you must have termux-api
installed.
You may use the script with any of the websites to monitor text changes. Just change the url
inside pinger.js
. Caution The script may not work as expected for websites with dynamic content E.g. ‘amazon.in’.
Does not detect text within <span>
tags.
Ours is a cool University, called PPU (Patliputra University), situated at the heart of Bihar. Very affectionately, we like to call it “Pappu University” and hence the project name.