update
This commit is contained in:
parent
3a9a4d092d
commit
b669984033
File diff suppressed because one or more lines are too long
|
|
@ -377,8 +377,8 @@ function extractListings(productsEl: HTMLElement) {
|
||||||
/\d/.test(el.textContent || "") && /[AU$]/.test(el.textContent || "")
|
/\d/.test(el.textContent || "") && /[AU$]/.test(el.textContent || "")
|
||||||
);
|
);
|
||||||
|
|
||||||
const priceMatch = priceEl?.textContent?.match(/\d+(?:\.\d+)?/);
|
const priceMatch = priceEl?.textContent?.match(/[\d,]+(?:\.\d+)?/);
|
||||||
const price = priceMatch ? parseFloat(priceMatch[0]) : 0;
|
const price = priceMatch ? parseFloat(priceMatch[0].replace(/,/g, "")) : 0;
|
||||||
|
|
||||||
return { title, price, el: productsEl };
|
return { title, price, el: productsEl };
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue