mirror of
https://github.com/mendableai/firecrawl.git
synced 2024-11-16 11:42:24 +08:00
Ensuring USE_DB_AUTHENTICATION is true in single URL scraper.
This commit is contained in:
parent
5a778f2c22
commit
ba2af74adf
|
@ -23,11 +23,13 @@ import { clientSideError } from "../../strings";
|
||||||
|
|
||||||
dotenv.config();
|
dotenv.config();
|
||||||
|
|
||||||
|
const useDatabaseAuth = process.env.USE_DB_AUTHENTICATION === "true";
|
||||||
|
|
||||||
export const baseScrapers = [
|
export const baseScrapers = [
|
||||||
"fire-engine",
|
"fire-engine",
|
||||||
"fire-engine;chrome-cdp",
|
"fire-engine;chrome-cdp",
|
||||||
"scrapingBee",
|
"scrapingBee",
|
||||||
process.env.USE_DB_AUTHENTICATION ? undefined : "playwright",
|
useDatabaseAuth ? undefined : "playwright",
|
||||||
"scrapingBeeLoad",
|
"scrapingBeeLoad",
|
||||||
"fetch",
|
"fetch",
|
||||||
].filter(Boolean);
|
].filter(Boolean);
|
||||||
|
@ -85,10 +87,10 @@ function getScrapingFallbackOrder(
|
||||||
});
|
});
|
||||||
|
|
||||||
let defaultOrder = [
|
let defaultOrder = [
|
||||||
!process.env.USE_DB_AUTHENTICATION ? undefined : "fire-engine",
|
!useDatabaseAuth ? undefined : "fire-engine",
|
||||||
!process.env.USE_DB_AUTHENTICATION ? undefined : "fire-engine;chrome-cdp",
|
!useDatabaseAuth ? undefined : "fire-engine;chrome-cdp",
|
||||||
"scrapingBee",
|
"scrapingBee",
|
||||||
process.env.USE_DB_AUTHENTICATION ? undefined : "playwright",
|
useDatabaseAuth ? undefined : "playwright",
|
||||||
"scrapingBeeLoad",
|
"scrapingBeeLoad",
|
||||||
"fetch",
|
"fetch",
|
||||||
].filter(Boolean);
|
].filter(Boolean);
|
||||||
|
@ -96,7 +98,7 @@ function getScrapingFallbackOrder(
|
||||||
if (isWaitPresent || isScreenshotPresent || isHeadersPresent) {
|
if (isWaitPresent || isScreenshotPresent || isHeadersPresent) {
|
||||||
defaultOrder = [
|
defaultOrder = [
|
||||||
"fire-engine",
|
"fire-engine",
|
||||||
process.env.USE_DB_AUTHENTICATION ? undefined : "playwright",
|
useDatabaseAuth ? undefined : "playwright",
|
||||||
...defaultOrder.filter(
|
...defaultOrder.filter(
|
||||||
(scraper) => scraper !== "fire-engine" && scraper !== "playwright"
|
(scraper) => scraper !== "fire-engine" && scraper !== "playwright"
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user