mirror of
https://github.com/mendableai/firecrawl.git
synced 2024-11-16 03:32:22 +08:00
feat(actions): add scroll
This commit is contained in:
parent
3dd912ec91
commit
d663bbf0ca
|
@ -78,6 +78,10 @@ export const actionsSchema = z.array(z.union([
|
|||
type: z.literal("pressKey"),
|
||||
key: z.string(),
|
||||
}),
|
||||
z.object({
|
||||
type: z.literal("scroll"),
|
||||
direction: z.enum(["up", "down"]),
|
||||
}),
|
||||
]));
|
||||
|
||||
export const scrapeOptions = z.object({
|
||||
|
|
|
@ -25,6 +25,9 @@ export type Action = {
|
|||
} | {
|
||||
type: "pressKey",
|
||||
key: string,
|
||||
} | {
|
||||
type: "scroll",
|
||||
direction: "up" | "down"
|
||||
};
|
||||
|
||||
export type PageOptions = {
|
||||
|
|
|
@ -99,7 +99,10 @@ export type Action = {
|
|||
} | {
|
||||
type: "pressKey",
|
||||
key: string,
|
||||
};;
|
||||
} | {
|
||||
type: "scroll",
|
||||
direction: "up" | "down",
|
||||
};
|
||||
|
||||
export interface ScrapeParams<LLMSchema extends zt.ZodSchema = any, ActionsSchema extends (Action[] | undefined) = undefined> extends CrawlScrapeOptions {
|
||||
extract?: {
|
||||
|
|
Loading…
Reference in New Issue
Block a user