mirror of
https://github.com/mendableai/firecrawl.git
synced 2024-11-16 03:32:22 +08:00
Update single_url.ts
This commit is contained in:
parent
8a4f4cb9d9
commit
fa8875d64d
|
@ -209,14 +209,15 @@ export async function scrapSingleUrl(
|
||||||
if (action.type === "click" || action.type === "write" || action.type === "press") {
|
if (action.type === "click" || action.type === "write" || action.type === "press") {
|
||||||
const result: Action[] = [];
|
const result: Action[] = [];
|
||||||
// Don't add a wait if the previous action is a wait
|
// Don't add a wait if the previous action is a wait
|
||||||
if (index === 0 || array[index - 1].type !== "wait") {
|
// if (index === 0 || array[index - 1].type !== "wait") {
|
||||||
result.push({ type: "wait", milliseconds: 1200 } as Action);
|
// result.push({ type: "wait", milliseconds: 1200 } as Action);
|
||||||
}
|
// }
|
||||||
|
// Fire-engine now handles wait times automatically, leaving the code here for now
|
||||||
result.push(action);
|
result.push(action);
|
||||||
// Don't add a wait if the next action is a wait
|
// Don't add a wait if the next action is a wait
|
||||||
if (index === array.length - 1 || array[index + 1].type !== "wait") {
|
// if (index === array.length - 1 || array[index + 1].type !== "wait") {
|
||||||
result.push({ type: "wait", milliseconds: 1200 } as Action);
|
// result.push({ type: "wait", milliseconds: 1200 } as Action);
|
||||||
}
|
// }
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
return [action as Action];
|
return [action as Action];
|
||||||
|
|
Loading…
Reference in New Issue
Block a user