feat: Implement Walmart scraper and integrate with existing architecture

- Added Walmart scraper to scrape product data from Walmart.com, including category pages and product details.
- Introduced a stealth browser module to handle bot protection and improve scraping reliability.
- Created a SQLite database for tracking product history, price changes, stock events, and user favorites.
- Developed a Discord bot for user interaction, allowing location setting and stock checking at local stores.
- Implemented a favorites system to manage priority products and categories with custom notification settings.
- Added news aggregation module to fetch and analyze Pokemon TCG news from various sources.
- Created tools for API discovery and monitoring, including a backend monitor for detecting new products.
- Added unit tests for database operations, product filtering, and API endpoints to ensure functionality.
- Enhanced existing modules with improved error handling and logging for better maintainability.
This commit is contained in:
2026-03-27 23:08:09 -04:00
parent cddae24e34
commit 8d382e723f
64 changed files with 15433 additions and 443 deletions
+15 -1
View File
@@ -13,6 +13,8 @@ document.addEventListener("DOMContentLoaded", async () => {
document.getElementById("enabled").checked = config.enabled !== false;
document.getElementById("notifyNew").checked = config.notifyNewProducts !== false;
document.getElementById("notifyRestock").checked = config.notifyRestocks !== false;
document.getElementById("syncDashboard").checked = config.syncToDashboard !== false;
document.getElementById("dashboardUrl").value = config.dashboardUrl || "http://localhost:5000";
// Update stats
document.getElementById("productCount").textContent = stats.totalProducts || 0;
@@ -30,7 +32,9 @@ document.addEventListener("DOMContentLoaded", async () => {
checkIntervalSeconds: parseInt(document.getElementById("interval").value) || 15,
enabled: document.getElementById("enabled").checked,
notifyNewProducts: document.getElementById("notifyNew").checked,
notifyRestocks: document.getElementById("notifyRestock").checked
notifyRestocks: document.getElementById("notifyRestock").checked,
syncToDashboard: document.getElementById("syncDashboard").checked,
dashboardUrl: document.getElementById("dashboardUrl").value.trim() || "http://localhost:5000"
};
await chrome.runtime.sendMessage({ type: "saveConfig", config: newConfig });
@@ -52,6 +56,16 @@ document.addEventListener("DOMContentLoaded", async () => {
showSaved("History cleared!");
}
});
// Sync to Dashboard button
document.getElementById("syncBtn").addEventListener("click", async () => {
const result = await chrome.runtime.sendMessage({ type: "syncToDashboard" });
if (result.success) {
showSaved(`Synced! ${result.total_skus || 0} SKUs, ${result.total_products || 0} products`);
} else {
showSaved("Sync failed - is dashboard running?");
}
});
});
function updateStatus(enabled) {