Update single_url.ts

This commit is contained in:
Nicolas 2024-07-25 17:51:41 -04:00
parent 56042d090c
commit 01fab6e036

View File

@ -26,10 +26,10 @@ export const baseScrapers = [
"fire-engine", "fire-engine",
"fire-engine;chrome-cdp", "fire-engine;chrome-cdp",
"scrapingBee", "scrapingBee",
"playwright", process.env.USE_DB_AUTHENTICATION ? undefined : "playwright",
"scrapingBeeLoad", "scrapingBeeLoad",
"fetch", "fetch",
] as const; ].filter(Boolean);
export async function generateRequestParams( export async function generateRequestParams(
url: string, url: string,
@ -95,11 +95,11 @@ function getScrapingFallbackOrder(
if (isWaitPresent || isScreenshotPresent || isHeadersPresent) { if (isWaitPresent || isScreenshotPresent || isHeadersPresent) {
defaultOrder = [ defaultOrder = [
"fire-engine", "fire-engine",
"playwright", process.env.USE_DB_AUTHENTICATION ? undefined : "playwright",
...defaultOrder.filter( ...defaultOrder.filter(
(scraper) => scraper !== "fire-engine" && scraper !== "playwright" (scraper) => scraper !== "fire-engine" && scraper !== "playwright"
), ),
]; ].filter(Boolean);
} }
const filteredDefaultOrder = defaultOrder.filter( const filteredDefaultOrder = defaultOrder.filter(