Skip to content

Commit

Permalink
Fix Single Url Scrape
Browse files Browse the repository at this point in the history
  • Loading branch information
ericciarla committed May 15, 2024
1 parent 4c767cd commit 3f9034b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/providers/WebScraper/single_url.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ export async function scrapSingleUrl(urlToScrap: string, toMarkdown: boolean = t

try {
let content = await scrapWithScrapingBee(urlToScrap);



if (!content) {
const res = await attemptScrapWithRequests(urlToScrap);
Expand Down Expand Up @@ -72,8 +74,14 @@ export async function scrapSingleUrl(urlToScrap: string, toMarkdown: boolean = t
}
});

if (formattedText.length < 1) {
formattedText = markdownContent;
}

const text = sanitizeText(formattedText.trim());



if (metadata) {
// console.log(markdownContent)
// console.log("here", toMarkdown)
Expand Down

0 comments on commit 3f9034b

Please sign in to comment.