ignorar paginas status!=200

This commit is contained in:
Cat /dev/Nulo 2024-01-01 16:50:17 -03:00
parent 7b989f0ea0
commit 405502877c

View file

@ -52,6 +52,12 @@ export async function parseWarc(path: string) {
console.debug(`skipped ${warcRecordId}`);
continue;
}
if (record.httpHeaders?.statusCode !== 200) {
console.debug(
`skipped ${warcRecordId} because status=${record.httpHeaders?.statusCode} (!=200)`
);
continue;
}
// TODO: sobreescribir si existe el mismo record-id pero con version mas bajo?
const html = await record.contentText();