mirror of
https://github.com/towfiqi/serpbear
synced 2025-06-26 18:15:54 +00:00
chore: code styling/formatting.
This commit is contained in:
parent
07eb4bd94f
commit
495d872bb9
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user