mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-12 04:49:05 +08:00
[feat] added second scrapeURLWithFireEngine (#1494)
This commit is contained in:
parent
9435c800c0
commit
37dabce1ed
@ -13,6 +13,7 @@ import { scrapeCache } from "./cache";
|
|||||||
|
|
||||||
export type Engine =
|
export type Engine =
|
||||||
| "fire-engine;chrome-cdp"
|
| "fire-engine;chrome-cdp"
|
||||||
|
| "fire-engine(retry);chrome-cdp"
|
||||||
| "fire-engine;playwright"
|
| "fire-engine;playwright"
|
||||||
| "fire-engine;tlsclient"
|
| "fire-engine;tlsclient"
|
||||||
| "playwright"
|
| "playwright"
|
||||||
@ -36,6 +37,7 @@ export const engines: Engine[] = [
|
|||||||
...(useFireEngine
|
...(useFireEngine
|
||||||
? [
|
? [
|
||||||
"fire-engine;chrome-cdp" as const,
|
"fire-engine;chrome-cdp" as const,
|
||||||
|
"fire-engine(retry);chrome-cdp" as const,
|
||||||
"fire-engine;playwright" as const,
|
"fire-engine;playwright" as const,
|
||||||
"fire-engine;tlsclient" as const,
|
"fire-engine;tlsclient" as const,
|
||||||
]
|
]
|
||||||
@ -109,6 +111,7 @@ const engineHandlers: {
|
|||||||
} = {
|
} = {
|
||||||
cache: scrapeCache,
|
cache: scrapeCache,
|
||||||
"fire-engine;chrome-cdp": scrapeURLWithFireEngineChromeCDP,
|
"fire-engine;chrome-cdp": scrapeURLWithFireEngineChromeCDP,
|
||||||
|
"fire-engine(retry);chrome-cdp": scrapeURLWithFireEngineChromeCDP,
|
||||||
"fire-engine;playwright": scrapeURLWithFireEnginePlaywright,
|
"fire-engine;playwright": scrapeURLWithFireEnginePlaywright,
|
||||||
"fire-engine;tlsclient": scrapeURLWithFireEngineTLSClient,
|
"fire-engine;tlsclient": scrapeURLWithFireEngineTLSClient,
|
||||||
playwright: scrapeURLWithPlaywright,
|
playwright: scrapeURLWithPlaywright,
|
||||||
@ -161,6 +164,23 @@ export const engineOptions: {
|
|||||||
},
|
},
|
||||||
quality: 50,
|
quality: 50,
|
||||||
},
|
},
|
||||||
|
"fire-engine(retry);chrome-cdp": {
|
||||||
|
features: {
|
||||||
|
actions: true,
|
||||||
|
waitFor: true, // through actions transform
|
||||||
|
screenshot: true, // through actions transform
|
||||||
|
"screenshot@fullScreen": true, // through actions transform
|
||||||
|
pdf: false,
|
||||||
|
docx: false,
|
||||||
|
atsv: false,
|
||||||
|
location: true,
|
||||||
|
mobile: true,
|
||||||
|
skipTlsVerification: true,
|
||||||
|
useFastMode: false,
|
||||||
|
stealthProxy: true,
|
||||||
|
},
|
||||||
|
quality: 45,
|
||||||
|
},
|
||||||
"fire-engine;playwright": {
|
"fire-engine;playwright": {
|
||||||
features: {
|
features: {
|
||||||
actions: false,
|
actions: false,
|
||||||
@ -273,7 +293,7 @@ export function buildFallbackList(meta: Meta): {
|
|||||||
...engines,
|
...engines,
|
||||||
|
|
||||||
// enable fire-engine in self-hosted testing environment when mocks are supplied
|
// enable fire-engine in self-hosted testing environment when mocks are supplied
|
||||||
...((!useFireEngine && meta.mock !== null) ? ["fire-engine;chrome-cdp", "fire-engine;playwright", "fire-engine;tlsclient"] as Engine[] : [])
|
...((!useFireEngine && meta.mock !== null) ? ["fire-engine;chrome-cdp", "fire-engine(retry);chrome-cdp", "fire-engine;playwright", "fire-engine;tlsclient"] as Engine[] : [])
|
||||||
];
|
];
|
||||||
|
|
||||||
if (meta.internalOptions.useCache !== true) {
|
if (meta.internalOptions.useCache !== true) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user