From 68ac09f0db07b705b11c4407d70326362a0ad324 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Sun, 4 Aug 2024 04:00:51 +0530 Subject: [PATCH] chore: lint --- maxun-core/src/browserSide/scraper.js | 30 +++++++++++++-------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/maxun-core/src/browserSide/scraper.js b/maxun-core/src/browserSide/scraper.js index 009cf9da..262e63ec 100644 --- a/maxun-core/src/browserSide/scraper.js +++ b/maxun-core/src/browserSide/scraper.js @@ -230,24 +230,24 @@ function scrapableHeuristics(maxCountPerPage = 50, minArea = 20000, scrolls = 3, return MBEs.map((mbe) => omap( lists, ({ selector, attribute }, key) => { - const elem = Array.from(document.querySelectorAll(selector)).find((elem) => mbe.contains(elem)); - if (!elem) return undefined; + const elem = Array.from(document.querySelectorAll(selector)).find((elem) => mbe.contains(elem)); + if (!elem) return undefined; - switch (attribute) { - case 'href': - return elem.getAttribute('href'); - case 'src': - return elem.getAttribute('src'); - case 'innerText': - return elem.innerText; - case 'textContent': - return elem.textContent; - default: - return elem.innerText; - } + switch (attribute) { + case 'href': + return elem.getAttribute('href'); + case 'src': + return elem.getAttribute('src'); + case 'innerText': + return elem.innerText; + case 'textContent': + return elem.textContent; + default: + return elem.innerText; + } }, (key) => key // Use the original key in the output - )); + )); } })(window); \ No newline at end of file