mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-11 23:58:59 +08:00
Nick: waitFor fixes
This commit is contained in:
parent
5819f60688
commit
6bfd24d903
@ -140,7 +140,7 @@ export const scrapeOptions = z
|
||||
excludeTags: z.string().array().optional(),
|
||||
onlyMainContent: z.boolean().default(true),
|
||||
timeout: z.number().int().positive().finite().safe().optional(),
|
||||
waitFor: z.number().int().nonnegative().finite().safe().max(60000).default(0),
|
||||
waitFor: z.number().int().nonnegative().finite().safe().max(30000).default(0),
|
||||
// Deprecate this to jsonOptions
|
||||
extract: extractOptions.optional(),
|
||||
// New
|
||||
|
@ -151,9 +151,9 @@ export async function scrapeURLWithFireEngineChromeCDP(
|
||||
// Transform waitFor option into an action (unsupported by chrome-cdp)
|
||||
...(meta.options.waitFor !== 0
|
||||
? [
|
||||
{
|
||||
{
|
||||
type: "wait" as const,
|
||||
milliseconds: meta.options.waitFor,
|
||||
milliseconds: meta.options.waitFor > 30000 ? 30000 : meta.options.waitFor,
|
||||
},
|
||||
]
|
||||
: []),
|
||||
|
Loading…
x
Reference in New Issue
Block a user