This project automate the process of checking boletos status in a Brazilian website.
- Automate login into the website using Puppeter
- Scrape the page to check if is there a new Boleto open to pay.
- If there is a new boleto, get the payment details
- Send the PDF file and amount to pay via Telegram message;
yarn start
# NAVIGATION VARIABLES
URL_LOGIN="https://clienteonline.samisistemas.com.br/login.php?Sigla="
URL_BOLETO="https://clienteonline.samisistemas.com.br/2viaboleto.php"
URL_POST_LOGIN="https://clienteonline.samisistemas.com.br"
# LOGIN CREDENTIALS
PASSWORD=""
USERNAME=""
# TELEGRAM CONFIGURATION
TELEGRAM_BOT_TOKEN=""
TELEGRAM_CHAT_ID=""
# PUPPETEER CONFIGURATION
PUPPETEER_EXECUTABLE_PATH=/Applications/Google Chrome.app/Contents/MacOS/Google Chrome
# “At minute 0 past every 3rd hour on every day-of-month from 15 through 30.”
0 */3 15-30 * * cd /Users/icaro.heimig/dev/check-boleto && /Users/icaro.heimig/.nvm/versions/node/v18.17.1/bin/node index.js >> log.txt