Update scrap_new_items.js
This commit is contained in:
parent
5f4db503e4
commit
e867c48e51
|
|
@ -152,7 +152,13 @@ async function scrapeWithPuppeteer(store) {
|
|||
if (match) {
|
||||
payload.currencyID = match[1] || match[3] || "";
|
||||
payload.price = match[2] || "";
|
||||
if (!payload.currency?.trim()) payload.currency = "AU";
|
||||
if (!payload.currencyID?.trim()) {
|
||||
const match1 = text.match(/([A-Za-z]{2,3})\s?([\d.]+)/);
|
||||
if (match1) {
|
||||
payload.currencyID = match[1] || match[3] || "";
|
||||
}
|
||||
}
|
||||
if (!payload.currencyID?.trim()) payload.currency = "AU";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue