bugfixed pageStatusCode
This commit is contained in:
@@ -518,12 +518,13 @@ export async function scrapSingleUrl(
|
|||||||
html = attempt.html ?? "";
|
html = attempt.html ?? "";
|
||||||
rawHtml = attempt.rawHtml ?? "";
|
rawHtml = attempt.rawHtml ?? "";
|
||||||
screenshot = attempt.screenshot ?? "";
|
screenshot = attempt.screenshot ?? "";
|
||||||
|
|
||||||
if (attempt.pageStatusCode) {
|
if (attempt.pageStatusCode) {
|
||||||
pageStatusCode = attempt.pageStatusCode;
|
pageStatusCode = attempt.pageStatusCode;
|
||||||
}
|
}
|
||||||
if (attempt.pageError && attempt.pageStatusCode != 200) {
|
if (attempt.pageError && attempt.pageStatusCode >= 400) {
|
||||||
pageError = attempt.pageError;
|
pageError = attempt.pageError;
|
||||||
} else {
|
} else if (attempt.pageStatusCode < 400) {
|
||||||
pageError = undefined;
|
pageError = undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user