mirror of
https://github.com/badlogic/heissepreise.git
synced 2024-06-30 12:27:15 +02:00
Dedect Unimarkt Bio Products
should dedect about 99% of unimarkt bio products
This commit is contained in:
parent
1fa31bdf7c
commit
7012e246fd
|
@ -8,6 +8,7 @@ exports.getCanonical = function (item, today) {
|
||||||
price: item.price,
|
price: item.price,
|
||||||
priceHistory: [{ date: today, price: item.price }],
|
priceHistory: [{ date: today, price: item.price }],
|
||||||
unit: item.unit,
|
unit: item.unit,
|
||||||
|
bio: item.name.toLowerCase().includes('bio'),
|
||||||
url: `https://shop.unimarkt.at${item.canonicalUrl}`,
|
url: `https://shop.unimarkt.at${item.canonicalUrl}`,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -28,7 +29,7 @@ exports.fetchData = async function () {
|
||||||
for (let category of UNIMARKT_MAIN_CATEGORIES) {
|
for (let category of UNIMARKT_MAIN_CATEGORIES) {
|
||||||
var res = await axios.get(UNIMARKT_BASE_URL + category, {
|
var res = await axios.get(UNIMARKT_BASE_URL + category, {
|
||||||
validateStatus: function (status) {
|
validateStatus: function (status) {
|
||||||
return (status >= 200 && status < 300) || status == 429;
|
return (status >= 200 && status < 300);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user