mirror of
https://github.com/mendableai/firecrawl.git
synced 2024-11-16 03:32:22 +08:00
fix(scrapeURL/fire-engine): wait longer if timeout is not specified
Some checks are pending
Deploy Images to GHCR / push-app-image (push) Waiting to run
Some checks are pending
Deploy Images to GHCR / push-app-image (push) Waiting to run
This commit is contained in:
parent
4cddcd5206
commit
63787bc504
|
@ -96,7 +96,9 @@ export async function scrapeURLWithFireEngineChromeCDP(meta: Meta): Promise<Engi
|
||||||
let response = await performFireEngineScrape(
|
let response = await performFireEngineScrape(
|
||||||
meta.logger.child({ method: "scrapeURLWithFireEngineChromeCDP/callFireEngine", request }),
|
meta.logger.child({ method: "scrapeURLWithFireEngineChromeCDP/callFireEngine", request }),
|
||||||
request,
|
request,
|
||||||
defaultTimeout + totalWait,
|
meta.options.timeout !== undefined
|
||||||
|
? defaultTimeout + totalWait
|
||||||
|
: Infinity, // TODO: better timeout handling
|
||||||
);
|
);
|
||||||
|
|
||||||
specialtyScrapeCheck(meta.logger.child({ method: "scrapeURLWithFireEngineChromeCDP/specialtyScrapeCheck" }), response.responseHeaders);
|
specialtyScrapeCheck(meta.logger.child({ method: "scrapeURLWithFireEngineChromeCDP/specialtyScrapeCheck" }), response.responseHeaders);
|
||||||
|
@ -148,7 +150,9 @@ export async function scrapeURLWithFireEnginePlaywright(meta: Meta): Promise<Eng
|
||||||
let response = await performFireEngineScrape(
|
let response = await performFireEngineScrape(
|
||||||
meta.logger.child({ method: "scrapeURLWithFireEngineChromeCDP/callFireEngine", request }),
|
meta.logger.child({ method: "scrapeURLWithFireEngineChromeCDP/callFireEngine", request }),
|
||||||
request,
|
request,
|
||||||
defaultTimeout + meta.options.waitFor
|
meta.options.timeout !== undefined
|
||||||
|
? defaultTimeout + meta.options.waitFor
|
||||||
|
: Infinity, // TODO: better timeout handling
|
||||||
);
|
);
|
||||||
|
|
||||||
specialtyScrapeCheck(meta.logger.child({ method: "scrapeURLWithFireEnginePlaywright/specialtyScrapeCheck" }), response.responseHeaders);
|
specialtyScrapeCheck(meta.logger.child({ method: "scrapeURLWithFireEnginePlaywright/specialtyScrapeCheck" }), response.responseHeaders);
|
||||||
|
@ -182,13 +186,16 @@ export async function scrapeURLWithFireEngineTLSClient(meta: Meta): Promise<Engi
|
||||||
atsv: meta.internalOptions.atsv,
|
atsv: meta.internalOptions.atsv,
|
||||||
geolocation: meta.options.geolocation,
|
geolocation: meta.options.geolocation,
|
||||||
disableJsDom: meta.internalOptions.v0DisableJsDom,
|
disableJsDom: meta.internalOptions.v0DisableJsDom,
|
||||||
|
|
||||||
timeout: meta.options.timeout === undefined ? 300000 : undefined, // TODO: better timeout logic
|
timeout: meta.options.timeout === undefined ? 300000 : undefined, // TODO: better timeout logic
|
||||||
};
|
};
|
||||||
|
|
||||||
let response = await performFireEngineScrape(
|
let response = await performFireEngineScrape(
|
||||||
meta.logger.child({ method: "scrapeURLWithFireEngineChromeCDP/callFireEngine", request }),
|
meta.logger.child({ method: "scrapeURLWithFireEngineChromeCDP/callFireEngine", request }),
|
||||||
request,
|
request,
|
||||||
|
meta.options.timeout !== undefined
|
||||||
|
? defaultTimeout
|
||||||
|
: Infinity, // TODO: better timeout handling
|
||||||
);
|
);
|
||||||
|
|
||||||
specialtyScrapeCheck(meta.logger.child({ method: "scrapeURLWithFireEngineTLSClient/specialtyScrapeCheck" }), response.responseHeaders);
|
specialtyScrapeCheck(meta.logger.child({ method: "scrapeURLWithFireEngineTLSClient/specialtyScrapeCheck" }), response.responseHeaders);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user