mirror of
https://github.com/badlogic/heissepreise.git
synced 2024-09-22 00:00:59 +02:00
Fix Lidl bio handling and budget brands. See #93
This commit is contained in:
parent
8d2d8fd80b
commit
29e827c71d
|
@ -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}`,
|
||||||
|
|
|
@ -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"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user