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