Skip to content

Commit

Permalink
fix(crawler): Skip validating URLs in metascrapper as it was already …
Browse files Browse the repository at this point in the history
…being validated. Fixes #22
  • Loading branch information
MohamedBassem committed Apr 9, 2024
1 parent f696d33 commit a9242a5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apps/workers/crawlerWorker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,9 @@ async function runCrawler(job: Job<ZCrawlLinkRequest, void>) {
const meta = await metascraperParser({
url,
html: htmlContent,
// We don't want to validate the URL again as we've already done it by visiting the page.
// This was added because URL validation fails if the URL ends with a question mark (e.g. empty query params).
validateUrl: false,
});
logger.info(`[Crawler][${jobId}] Done parsing the content of the page.`);

Expand Down

0 comments on commit a9242a5

Please sign in to comment.