Update index.js
This commit is contained in:
parent
07e522f6a7
commit
e560368120
4
index.js
4
index.js
|
|
@ -269,10 +269,10 @@ async function main() {
|
||||||
|
|
||||||
if (errors.length > 3) {
|
if (errors.length > 3) {
|
||||||
const msg = errors.map((e) => `URL: ${e.url}\nMessage: ${e.message}`).join("\n\n");
|
const msg = errors.map((e) => `URL: ${e.url}\nMessage: ${e.message}`).join("\n\n");
|
||||||
await sendMail("[New Items] - Scraping Sold Out Error Report", msg);
|
await sendMail("[Sold out] - Scraping Sold Out Error Report", msg);
|
||||||
} else {
|
} else {
|
||||||
const msg = inserted.map((i) => `Shop: ${i.name}\nSold: ${i.count} items`).join("\n\n");
|
const msg = inserted.map((i) => `Shop: ${i.name}\nSold: ${i.count} items`).join("\n\n");
|
||||||
await sendMail("[New Items] - Scraping Sold Out Success", msg);
|
await sendMail("[Sold out] - Scraping Sold Out Success", msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log("✅ Done scraping.");
|
console.log("✅ Done scraping.");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue