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: {
name: "Lidl",
budgetBrands: ["milbona"],
budgetBrands: ["milbona", "alpengut", "cien", "livarno", "wiesentaler"],
color: "pink",
defaultChecked: true,
getUrl: (item) => `https://www.lidl.at${item.url}`,

View File

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