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);