From 023128812d88526f01bc6b7f6fcf6542f6ee44e9 Mon Sep 17 00:00:00 2001 From: "Brennan Wilkes (Text Groove)" Date: Sat, 31 Jan 2026 17:11:30 -0800 Subject: [PATCH] feat: New BSW Store --- src/stores/bsw.js | 6 ++++++ tools/build_email_alert.js | 4 ++-- tools/discover_bad_skus.js | 5 +++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/stores/bsw.js b/src/stores/bsw.js index 3c3936f..2da2523 100644 --- a/src/stores/bsw.js +++ b/src/stores/bsw.js @@ -380,6 +380,12 @@ function createStore(defaultUa) { startUrl: "https://www.bswliquor.com/collections/rum?page=1", bswRuleContext: "rum", }, + { + key: "whisky", + label: "Whisky", + startUrl: "https://www.bswliquor.com/collections/whisky?page=1", + bswRuleContext: "whisky", + }, ], }; } diff --git a/tools/build_email_alert.js b/tools/build_email_alert.js index 827d58f..8a15cd6 100755 --- a/tools/build_email_alert.js +++ b/tools/build_email_alert.js @@ -308,7 +308,7 @@ function renderHtml({ title, subtitle, uniqueNews, bigSales, commitUrl, pagesUrl
${name}
${store}${cat ? " ยท " + cat : ""}
-
${price}
+ ${price ? `
${price}
` : ""} ${extraHtml || ""} ${url ? `
View item
` : ""} @@ -331,7 +331,7 @@ function renderHtml({ title, subtitle, uniqueNews, bigSales, commitUrl, pagesUrl ${pct !== null ? `(${pct}% off)` : ""} `; - return card({ ...it, price: it.newPrice }, extra); + return card({ ...it, price: "" }, extra); }) .join(""); diff --git a/tools/discover_bad_skus.js b/tools/discover_bad_skus.js index e8770ff..0741823 100644 --- a/tools/discover_bad_skus.js +++ b/tools/discover_bad_skus.js @@ -29,12 +29,13 @@ for (const file of fs.readdirSync(DB_DIR)) { const data = JSON.parse(fs.readFileSync(path.join(DB_DIR, file), "utf8")); if (!Array.isArray(data.items)) continue; - for (const { sku, url } of data.items) { + for (const { sku, url, removed } of data.items) { if ( + removed === false && typeof sku === "string" && sku.startsWith("u:") && url && - (includeLinked || !linkedSkus.has(String(sku))) + (includeLinked || !linkedSkus.has(sku)) ) { console.log(url); }