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:
Nicolasf82ca3be17c0
diff --git a/apps/api/src/scraper/WebScraper/single_url.ts b/apps/api/src/scraper/WebScraper/single_url.tsindex dd4d9f71f..0fce76b66 100644--- a/apps/api/src/scraper/WebScraper/single_url.ts+++ b/apps/api/src/scraper/WebScraper/single_url.ts@@ -19,6 +19,7 @@ import { scrapWithScrapingBee } from "./scrapers/scrapingBee";import { extractLinks } from "./utils/utils";import { Logger } from "../../lib/logger";import { ScrapeEvents } from "../../lib/scrape-events";+import { clientSideError } from "../../strings";dotenv.config();@@ -311,7 +312,7 @@ export async function scrapSingleUrl(for (const scraper of scrapersInOrder) {// If exists text coming from crawler, use it- if (existingHtml && existingHtml.trim().length >= 100) {+ if (existingHtml && existingHtml.trim().length >= 100 && !existingHtml.includes(clientSideError)) {let cleanedHtml = removeUnwantedElements(existingHtml, pageOptions);text = await parseMarkdown(cleanedHtml);html = cleanedHtml;diff --git a/apps/api/src/strings.ts b/apps/api/src/strings.tsindex e7a6f21ee..8edc57f18 100644--- a/apps/api/src/strings.ts+++ b/apps/api/src/strings.ts@@ -1,2 +1,4 @@export const errorNoResults ="No results found, please check the URL or contact us at [email protected] to file a ticket.";++export const clientSideError = "client-side exception has occurred"\ No newline at end of file