A small script that resolves catcha and checks for presence of a specific text afterwards. If not found, the notification is sent to the specified telegram user.
Note: this script was not generalised, you may want to change DOM selectors found in
checkPageText
function for your specific purpose.
CHECK_PAGE_URL
(required) - the url of the start page that need needs to be checkedCAPTCHA_API_KEY
(required) - the API key of the captcha-solving APITELEGRAM_*
(optional) - information related to the telegram notification. If not provided, message sending will be skipped, instead logged to thestdout
TELEGRAM_TOKEN
(required) - token of the telegram botTELEGRAM_CHAT_ID
(required) - chat ID to which the notification will be send. Please note that this user have to first initiate a conversation with the bot in order to receive messages later on
- Install dependencies via
npm ci
- Set environment variables into
.env
file or provide them during runtime - Run script via
node index.js
- Check console output and/or your telegram notifications