Skip to content

Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥

Merge branch 'main' into feat/better-gdrive-pdf-fetch

Rafael Miller9e000ded03aa
diff --cc apps/api/src/scraper/WebScraper/single_url.ts
index 10d32ce89,45b3f8ca5..188a45474
--- a/apps/api/src/scraper/WebScraper/single_url.ts
+++ b/apps/api/src/scraper/WebScraper/single_url.ts
@@@ -331,13 -333,8 +333,13 @@@ export async function scrapSingleUrl
// Check for custom scraping conditions
const customScraperResult = await handleCustomScraping(text, url);
- if(customScraperResult){
- customScrapedContent = await scrapWithFireEngine(customScraperResult.url, customScraperResult.waitAfterLoad, false, customScraperResult.pageOptions)
+ if (customScraperResult){
+ switch (customScraperResult.scraper) {
+ case "fire-engine":
- customScrapedContent = await scrapWithFireEngine(customScraperResult.url, customScraperResult.wait_after_load)
++ customScrapedContent = await scrapWithFireEngine(customScraperResult.url, customScraperResult.waitAfterLoad, false, customScraperResult.pageOptions)
+ case "pdf":
+ customScrapedContent = { html: await fetchAndProcessPdf(customScraperResult.url), screenshot }
+ }
}
if (customScrapedContent) {