mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-14 17:45:58 +08:00
bugfixed pageStatusCode
This commit is contained in:
parent
50eecf04a9
commit
7b7154ba1e
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user