chore: lint
This commit is contained in:
@@ -283,9 +283,9 @@ function scrapableHeuristics(maxCountPerPage = 50, minArea = 20000, scrolls = 3,
|
|||||||
} else if (attribute === 'innerHTML') {
|
} else if (attribute === 'innerHTML') {
|
||||||
record[label] = fieldElement.innerHTML.trim();
|
record[label] = fieldElement.innerHTML.trim();
|
||||||
} else if (attribute === 'src') {
|
} else if (attribute === 'src') {
|
||||||
// Handle relative 'src' URLs
|
// Handle relative 'src' URLs
|
||||||
const src = fieldElement.getAttribute('src');
|
const src = fieldElement.getAttribute('src');
|
||||||
record[label] = src ? new URL(src, window.location.origin).href : null;
|
record[label] = src ? new URL(src, window.location.origin).href : null;
|
||||||
} else if (attribute === 'href') {
|
} else if (attribute === 'href') {
|
||||||
// Handle relative 'href' URLs
|
// Handle relative 'href' URLs
|
||||||
const href = fieldElement.getAttribute('href');
|
const href = fieldElement.getAttribute('href');
|
||||||
@@ -346,5 +346,5 @@ function scrapableHeuristics(maxCountPerPage = 50, minArea = 20000, scrolls = 3,
|
|||||||
|
|
||||||
return results;
|
return results;
|
||||||
};
|
};
|
||||||
|
|
||||||
})(window);
|
})(window);
|
||||||
Reference in New Issue
Block a user