Fix Lidl bio handling and budget brands. See #93

This commit is contained in:
Mario Zechner 2023-06-22 22:55:25 +02:00
parent 8d2d8fd80b
commit 29e827c71d
2 changed files with 5 additions and 2 deletions

View File

@ -24,7 +24,7 @@ exports.stores = {
}, },
lidl: { lidl: {
name: "Lidl", name: "Lidl",
budgetBrands: ["milbona"], budgetBrands: ["milbona", "alpengut", "cien", "livarno", "wiesentaler"],
color: "pink", color: "pink",
defaultChecked: true, defaultChecked: true,
getUrl: (item) => `https://www.lidl.at${item.url}`, getUrl: (item) => `https://www.lidl.at${item.url}`,

View File

@ -36,16 +36,19 @@ exports.getCanonical = function (item, today) {
unit = unit.split("-")[0]; unit = unit.split("-")[0];
} }
const name = `${item.keyfacts?.supplementalDescription?.concat(" ") ?? ""}${item.fullTitle}`;
return utils.convertUnit( return utils.convertUnit(
{ {
id: item.productId, id: item.productId,
name: `${item.keyfacts?.supplementalDescription?.concat(" ") ?? ""}${item.fullTitle}`, name,
description: item.keyfacts?.description ?? "", description: item.keyfacts?.description ?? "",
price: item.price.price, price: item.price.price,
priceHistory: [{ date: today, price: item.price.price }], priceHistory: [{ date: today, price: item.price.price }],
unit, unit,
quantity, quantity,
url: item.canonicalUrl, url: item.canonicalUrl,
bio: name.toLowerCase().includes("bio"),
}, },
units, units,
"lidl" "lidl"