From 7012e246fddb8be6f7d73427e97f7871f9152e23 Mon Sep 17 00:00:00 2001 From: Markus Tiefenbacher Date: Mon, 29 May 2023 09:55:51 +0200 Subject: [PATCH] Dedect Unimarkt Bio Products should dedect about 99% of unimarkt bio products --- stores/unimarkt.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stores/unimarkt.js b/stores/unimarkt.js index bbe7f6a..e9358de 100644 --- a/stores/unimarkt.js +++ b/stores/unimarkt.js @@ -8,6 +8,7 @@ exports.getCanonical = function (item, today) { price: item.price, priceHistory: [{ date: today, price: item.price }], unit: item.unit, + bio: item.name.toLowerCase().includes('bio'), url: `https://shop.unimarkt.at${item.canonicalUrl}`, }; }; @@ -28,7 +29,7 @@ exports.fetchData = async function () { for (let category of UNIMARKT_MAIN_CATEGORIES) { var res = await axios.get(UNIMARKT_BASE_URL + category, { validateStatus: function (status) { - return (status >= 200 && status < 300) || status == 429; + return (status >= 200 && status < 300); }, });