bugfixed pageStatusCode

This commit is contained in:
rafaelsideguide 2024-07-02 10:51:35 -03:00
parent 50eecf04a9
commit 7b7154ba1e

View File

@ -518,12 +518,13 @@ export async function scrapSingleUrl(
html = attempt.html ?? "";
rawHtml = attempt.rawHtml ?? "";
screenshot = attempt.screenshot ?? "";
if (attempt.pageStatusCode) {
pageStatusCode = attempt.pageStatusCode;
}
if (attempt.pageError && attempt.pageStatusCode != 200) {
if (attempt.pageError && attempt.pageStatusCode >= 400) {
pageError = attempt.pageError;
} else {
} else if (attempt.pageStatusCode < 400) {
pageError = undefined;
}