Stock/not-in-stock scraper - slight reliability improvement

minor-stock-scraper
dgtlmoon 3 months ago
parent f255165571
commit 4b1cfd7bd3

@ -154,10 +154,14 @@ function isItemInStock() {
} }
elementText = ""; elementText = "";
if (element.tagName.toLowerCase() === "input") { try {
elementText = element.value.toLowerCase().trim(); if (element.tagName.toLowerCase() === "input") {
} else { elementText = element.value.toLowerCase().trim();
elementText = getElementBaseText(element); } else {
elementText = getElementBaseText(element);
}
} catch (e) {
console.warn('stock-not-in-stock.js scraper - handling element for gettext failed', e);
} }
if (elementText.length) { if (elementText.length) {

Loading…
Cancel
Save