mirror of
https://github.com/catdevnull/preciazo.git
synced 2024-11-29 21:16:19 +00:00
scrap manual: printear resultado
This commit is contained in:
parent
8482d7ceea
commit
eb271fb496
1 changed files with 7 additions and 4 deletions
|
@ -7,16 +7,19 @@ import { parseWarc } from "./scrap.js";
|
||||||
if (process.argv[2] === "auto") {
|
if (process.argv[2] === "auto") {
|
||||||
await auto();
|
await auto();
|
||||||
} else if (process.argv[2] === "scrap-carrefour-links") {
|
} else if (process.argv[2] === "scrap-carrefour-links") {
|
||||||
await scrapCarrefourProducts()
|
await scrapCarrefourProducts();
|
||||||
} else if (process.argv[2] === "scrap-dia-links") {
|
} else if (process.argv[2] === "scrap-dia-links") {
|
||||||
await scrapDiaProducts()
|
await scrapDiaProducts();
|
||||||
} else if (process.argv[2] === "scrap-coto-links") {
|
} else if (process.argv[2] === "scrap-coto-links") {
|
||||||
await scrapCotoProducts()
|
await scrapCotoProducts();
|
||||||
} else if (process.argv[2] === "scrap") {
|
} else if (process.argv[2] === "scrap") {
|
||||||
const warcPaths = process.argv.slice(3);
|
const warcPaths = process.argv.slice(3);
|
||||||
if (warcPaths.length > 0) {
|
if (warcPaths.length > 0) {
|
||||||
for (const path of warcPaths) {
|
for (const path of warcPaths) {
|
||||||
await parseWarc(path);
|
const res = await parseWarc(path);
|
||||||
|
console.info("=======================================");
|
||||||
|
console.info(path, res);
|
||||||
|
console.info("=======================================");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
console.error("Especificá WARCs para scrapear.");
|
console.error("Especificá WARCs para scrapear.");
|
||||||
|
|
Loading…
Reference in a new issue