Stock/not-in-stock scraper - slight reliability improvement (#2687)

skip_when_checksum_same-disable
dgtlmoon 1 month ago committed by GitHub
parent f255165571
commit 69fbafbdb7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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

Loading…
Cancel
Save