Easy Price Monitor is a tool for tracking and monitoring product prices from various online sources.
It is designed to track prices from multiple sites using easy-to-extend plugins. Currently, the tool supports popular tech stores in Poland.
This tool provides no visual representation of collected data.
However, in docs/grafana.md you can find a template to visually represent price history for selected products.
- Track prices from multiple websites
- Easy to expand support for new websites via plugins
- Saving price records to CSV
- MySQL support
- Lightweight
- Built-in email alerting system for both MySQL and CSV
- Support for multiple email recipients
- Automatic alert consolidation when using multiple handlers
git clone https://github.com/Kordight/Easy-Price-Monitor
cd Easy-Price-Monitor
chmod +x save_prices.shMake sure to edit
save_prices.shand replacePROJECT_DIRwith your project path.For example, in
save_prices.sh:Before:
PROJECT_DIR="/path/to/your/project"After (replace with your actual path):
PROJECT_DIR="/home/youruser/Easy-Price-Monitor"
You can use the tool in two ways:
-
Run the script directly The easiest way is to run:
./save_prices.sh
Warning: By default, this script also saves data to the database.
Make sure to check thescheduled_price_scraping.mdsection or disable it by changing the desired handlers (line 53):$PYTHON_BIN "$SCRIPT_PATH" --handlers mysql csv
-
Console call via Python Run the script with:
python easyPriceMonitor.py --handlers [csv,mysql]
Example:
python easyPriceMonitor.py --handlers csv mysqlpython easyPriceMonitor.py --handlers mysql
To add products to monitor, edit products.json.
This file is automatically created if it does not exist.
Example structure:
{
"products": [
{
"id": 1,
"name": "ASRock X870 Pro RS",
"shops": [
{
"name": "x-kom",
"url": "https://www.x-kom.pl/p/1281720-plyta-glowna-socket-am5-asrock-x870-pro-rs.html"
}
]
},
{
"id": 2,
"name": "Gembird CR2032 (2szt)",
"shops": [
{
"name": "x-kom",
"url": "https://www.x-kom.pl/p/748392-bateria-i-akumulatorek-gembird-cr2032-2szt.html?cid=api09&eid=pdp_pcacc"
}
]
}
]
}To configure the connection with the database, edit mysql_config.json.
This file is automatically created if it does not exist.
Example structure:
{
"connection": {
"host": "localhost",
"database": "easy_price_monitor",
"user": "easy-price-monitor",
"password": "",
"port": 3306
}
}To configure email alerts, edit easyPrice_monitor_config.json.
This file is automatically created if it does not exist.
Example structure:
{
"settings": [
{
"bUseDelayInterval": true,
"interval": [
{
"minIntervalSeconds": 5,
"maxInterval": 20
}
],
"alerts": {
"bEnableAlerts": true,
"percentDropThreshold": 3.5,
"ProductIDs": []
},
"email": {
"smtpServer": "smtp.gmail.com",
"smtpPort": 587,
"user": "source@gmail.com",
"password": "your-app-password",
"from": "source@gmail.com",
"to": ["recipient1@example.com", "recipient2@example.com"]
}
}
]
}Notes:
bEnableAlerts: Enable or disable email alertspercentDropThreshold: Minimum percentage change to trigger an alert (e.g., 3.5 means ±3.5%)ProductIDs: List of specific product IDs to monitor, or empty array[]for all productsemail.to: Can be a single email address as a string, or an array of multiple recipients- When using both CSV and MySQL handlers, only one consolidated email will be sent
Contributions are welcome! Please open issues or submit pull requests to improve the project.
This project is licensed under the MIT License. See the LICENSE file for details.