Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥
TypeScript aiai-agentsai-crawlerai-scrapingai-searchcrawlerdata-extractionhtml-to-markdownllmmarkdownscraperscrapingweb-crawlerweb-dataweb-data-extractionweb-scraperweb-scrapingweb-searchwebscraping
Nick: comments
Nicolas2d30cc6117b9
diff --git a/apps/api/src/scraper/WebScraper/scrapers/fetch.ts b/apps/api/src/scraper/WebScraper/scrapers/fetch.tsindex 562fa6e7b..9badfd91c 100644--- a/apps/api/src/scraper/WebScraper/scrapers/fetch.ts+++ b/apps/api/src/scraper/WebScraper/scrapers/fetch.ts@@ -3,6 +3,13 @@ import { logScrape } from "../../../services/logging/scrape_log";import { fetchAndProcessPdf } from "../utils/pdfProcessor";import { universalTimeout } from "../global";++/**+ * Scrapes a URL with Axios+ * @param url The URL to scrape+ * @param pageOptions The options for the page+ * @returns The scraped content+ */export async function scrapWithFetch(url: string,pageOptions: { parsePDF?: boolean } = { parsePDF: true }diff --git a/apps/api/src/scraper/WebScraper/scrapers/fireEngine.ts b/apps/api/src/scraper/WebScraper/scrapers/fireEngine.tsindex f6121861a..ce3cd2da5 100644--- a/apps/api/src/scraper/WebScraper/scrapers/fireEngine.ts+++ b/apps/api/src/scraper/WebScraper/scrapers/fireEngine.ts@@ -5,6 +5,16 @@ import { generateRequestParams } from "../single_url";import { fetchAndProcessPdf } from "../utils/pdfProcessor";import { universalTimeout } from "../global";+/**+ * Scrapes a URL with Fire-Engine+ * @param url The URL to scrape+ * @param waitFor The time to wait for the page to load+ * @param screenshot Whether to take a screenshot+ * @param pageOptions The options for the page+ * @param headers The headers to send with the request+ * @param options The options for the request+ * @returns The scraped content+ */export async function scrapWithFireEngine({url,waitFor = 0,diff --git a/apps/api/src/scraper/WebScraper/scrapers/playwright.ts b/apps/api/src/scraper/WebScraper/scrapers/playwright.tsindex fd1aef53d..03a6728d7 100644--- a/apps/api/src/scraper/WebScraper/scrapers/playwright.ts+++ b/apps/api/src/scraper/WebScraper/scrapers/playwright.ts@@ -4,6 +4,14 @@ import { generateRequestParams } from "../single_url";import { fetchAndProcessPdf } from "../utils/pdfProcessor";import { universalTimeout } from "../global";+/**+ * Scrapes a URL with Playwright+ * @param url The URL to scrape+ * @param waitFor The time to wait for the page to load+ * @param headers The headers to send with the request+ * @param pageOptions The options for the page+ * @returns The scraped content+ */export async function scrapWithPlaywright(url: string,waitFor: number = 0,diff --git a/apps/api/src/scraper/WebScraper/scrapers/scrapingBee.ts b/apps/api/src/scraper/WebScraper/scrapers/scrapingBee.tsindex 5ab0e061d..63e8a082b 100644--- a/apps/api/src/scraper/WebScraper/scrapers/scrapingBee.ts+++ b/apps/api/src/scraper/WebScraper/scrapers/scrapingBee.ts@@ -4,7 +4,14 @@ import { fetchAndProcessPdf } from "../utils/pdfProcessor";import { universalTimeout } from "../global";import { ScrapingBeeClient } from "scrapingbee";-+/**+ * Scrapes a URL with ScrapingBee+ * @param url The URL to scrape+ * @param wait_browser The browser event to wait for+ * @param timeout The timeout for the scrape+ * @param pageOptions The options for the page+ * @returns The scraped content+ */export async function scrapWithScrapingBee(url: string,wait_browser: string = "domcontentloaded",