Update scrap_new_items.js

This commit is contained in:
nguyentrungthat 2025-12-10 17:17:01 +07:00
parent b60b517f8c
commit deb585e884
1 changed files with 2 additions and 1 deletions

View File

@ -391,7 +391,7 @@ async function main() {
}
// console.log(`Total configs to process: ${configs.length}`);
for (const store of configs) {
console.log(`Processing ${store.data}`);
// console.log(`Processing ${store.data}`);
// let items = await scrapeWithCheerio(store);
let items = await scrapeWithPuppeteer(store);
for (const item of items) {
@ -401,6 +401,7 @@ async function main() {
// 3⃣ Insert new record
const title = (item.title || "").replace("Opens in a new window or tab", "").trim();
console.log(`Processing ${store.data}`);
console.log({ ...item, title });
await axios
.post(