🐛 FIX: rightPrice est convertit en Number
This commit is contained in:
parent
fbe225fbbb
commit
df512dea12
@ -27,10 +27,11 @@ async function getAmazonProductList(url) {
|
|||||||
try {
|
try {
|
||||||
const elementProduct = amazonProductList[indexProduct];
|
const elementProduct = amazonProductList[indexProduct];
|
||||||
const productImage = elementProduct.querySelector('.s-image');
|
const productImage = elementProduct.querySelector('.s-image');
|
||||||
|
const originalPrice = elementProduct.querySelector(".a-price-whole").innerHTML;
|
||||||
productsList.push({
|
productsList.push({
|
||||||
name: productImage["alt"],
|
name: productImage["alt"],
|
||||||
image: productImage["src"],
|
image: productImage["src"],
|
||||||
price: elementProduct.querySelector(".a-price-whole").innerHTML
|
price: Number(originalPrice.replace(",", ".").replace(" ", ""))
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
continue;
|
continue;
|
||||||
|
Reference in New Issue
Block a user