From 495d872bb9019ee729e4e5decee6abc1b6408755 Mon Sep 17 00:00:00 2001 From: towfiqi Date: Sun, 23 Feb 2025 22:35:53 +0600 Subject: [PATCH] chore: code styling/formatting. --- scrapers/services/proxy.ts | 4 ++-- utils/scraper.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scrapers/services/proxy.ts b/scrapers/services/proxy.ts index 88f3e5a..8935468 100644 --- a/scrapers/services/proxy.ts +++ b/scrapers/services/proxy.ts @@ -16,8 +16,8 @@ const proxy:ScraperSettings = { const $ = cheerio.load(content); let lastPosition = 0; - const hasValidContent = $('body').find('#main') - if (hasValidContent.length == 0) { + const hasValidContent = $('body').find('#main'); + if (hasValidContent.length === 0) { const msg = '[ERROR] Scraped search results from proxy do not adhere to expected format. Unable to parse results'; console.log(msg); throw new Error(msg); diff --git a/utils/scraper.ts b/utils/scraper.ts index 83efb84..4cef37e 100644 --- a/utils/scraper.ts +++ b/utils/scraper.ts @@ -153,7 +153,7 @@ export const extractScrapedResult = (content: string, device: string): SearchRes const $ = cheerio.load(content); const hasValidContent = [...$('body').find('#search'), ...$('body').find('#rso')]; - if (hasValidContent.length == 0) { + if (hasValidContent.length === 0) { const msg = '[ERROR] Scraped search results do not adhere to expected format. Unable to parse results'; console.log(msg); throw new Error(msg);