mirror of
https://github.com/mendableai/firecrawl.git
synced 2024-11-15 19:22:19 +08:00
Nick: exec js actions
This commit is contained in:
parent
ed5a0d3cf2
commit
7500ebe4c6
|
@ -92,6 +92,10 @@ export const actionsSchema = z.array(z.union([
|
|||
z.object({
|
||||
type: z.literal("scrape"),
|
||||
}),
|
||||
z.object({
|
||||
type: z.literal("executeJavascript"),
|
||||
script: z.string()
|
||||
}),
|
||||
]));
|
||||
|
||||
export const scrapeOptions = z.object({
|
||||
|
|
|
@ -31,6 +31,9 @@ export type Action = {
|
|||
direction: "up" | "down"
|
||||
} | {
|
||||
type: "scrape",
|
||||
} | {
|
||||
type: "executeJavascript",
|
||||
script: string,
|
||||
}
|
||||
|
||||
export type PageOptions = {
|
||||
|
|
|
@ -109,6 +109,9 @@ export type Action = {
|
|||
direction: "up" | "down",
|
||||
} | {
|
||||
type: "scrape",
|
||||
} | {
|
||||
type: "executeJavascript",
|
||||
script: string,
|
||||
};
|
||||
|
||||
export interface ScrapeParams<LLMSchema extends zt.ZodSchema = any, ActionsSchema extends (Action[] | undefined) = undefined> extends CrawlScrapeOptions {
|
||||
|
|
Loading…
Reference in New Issue
Block a user