|
|
@ -219,13 +219,13 @@ function getBarcode_bolCom(barcode) {
|
|
|
|
if (response.statusCode === 200) {
|
|
|
|
if (response.statusCode === 200) {
|
|
|
|
let $ = cheerio.load(response.body);
|
|
|
|
let $ = cheerio.load(response.body);
|
|
|
|
|
|
|
|
|
|
|
|
let productName = cleanValue($(".pdp-header__title").text());
|
|
|
|
let productName = cleanValue($(".product-title").text());
|
|
|
|
|
|
|
|
|
|
|
|
if (productName.length > 0) {
|
|
|
|
if (productName.length > 0) {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
name: productName,
|
|
|
|
name: productName,
|
|
|
|
image: $(".js_product_img").attr("src"),
|
|
|
|
image: $(".product-image img").attr("src").replace("/regular/", "/extralarge/"),
|
|
|
|
price: `€ ${cleanValue($(".promo-price").text())}`
|
|
|
|
price: `€ ${cleanValue($("meta[itemprop=price]").attr('content')).replace(".", ",")}`,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -249,7 +249,6 @@ function getBarcode_calorielijst(barcode) {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
name: productName,
|
|
|
|
name: productName,
|
|
|
|
image: (image != "") ? `http://img.calorielijst.nl/product/${image}` : null,
|
|
|
|
image: (image != "") ? `http://img.calorielijst.nl/product/${image}` : null,
|
|
|
|
//~ price: "N/A",
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|