scrap manual: printear resultado

This commit is contained in:
Cat /dev/Nulo 2024-01-01 16:03:22 -03:00
parent 8482d7ceea
commit eb271fb496

View file

@ -7,16 +7,19 @@ import { parseWarc } from "./scrap.js";
if (process.argv[2] === "auto") {
await auto();
} else if (process.argv[2] === "scrap-carrefour-links") {
await scrapCarrefourProducts()
await scrapCarrefourProducts();
} else if (process.argv[2] === "scrap-dia-links") {
await scrapDiaProducts()
await scrapDiaProducts();
} else if (process.argv[2] === "scrap-coto-links") {
await scrapCotoProducts()
await scrapCotoProducts();
} else if (process.argv[2] === "scrap") {
const warcPaths = process.argv.slice(3);
if (warcPaths.length > 0) {
for (const path of warcPaths) {
await parseWarc(path);
const res = await parseWarc(path);
console.info("=======================================");
console.info(path, res);
console.info("=======================================");
}
} else {
console.error("Especificá WARCs para scrapear.");