Price Checker
Terminal application to monitor washing machine prices daily, track changes in a CSV table, and send a Telegram summary.
Requirements
- Go 1.22+
- Optional: Telegram bot token and chat ID for notifications
Usage
go run . --run-onceUse custom URLs:
go run . --urls "https://example.com/item1,https://example.com/item2" --run-onceOr provide a file with one URL per line:
go run . --urls-file urls.txt --run-onceRun continuously (default 24h interval):
go run .Telegram configuration
Set the following environment variables to enable daily summaries:
export TELEGRAM_BOT_TOKEN="<bot_token>"
export TELEGRAM_CHAT_ID="<chat_id>"Getting your Telegram bot token
- Open Telegram and start a chat with @Botfather.
- Send
/newbotand follow the prompts to name your bot. - BotFather will return a token that looks like
123456789:ABCDEF.... Use this asTELEGRAM_BOT_TOKEN.
Getting your chat ID
- Start a chat with your bot (send any message so the bot can see you).
- Open the following URL in a browser, replacing
<bot_token>with your token:
https://api.telegram.org/bot<bot_token>/getUpdates - Look for
"chat":{"id":...}in the JSON response. The numeric value is yourTELEGRAM_CHAT_ID.- For a group chat, add the bot to the group, send a message, then call
getUpdatesagain.
- For a group chat, add the bot to the group, send a message, then call
Data table
The application stores checks in prices.csv by default. Each run records:
- Timestamp
- URL
- Price and currency
- Delta from previous check
- Decrease flag
Notes
- The scraper looks for price metadata and JSON-LD data; if the site layout changes, update the selectors in
main.go.