fix issue with zestimate sometimes returning 0

This commit is contained in:
Robert Dyer
2026-05-21 15:27:24 -05:00
parent c653f8c28b
commit 867694ce9a
+2 -10
View File
@@ -13,19 +13,11 @@ async function getZestimate(URL) {
const html = await driver.wait(until.elementLocated(By.css('body')), 5000).getAttribute('innerHTML');
try {
let match = html.match(/"price":(\d+)/);
let match = html.match(/\\?"zestimate\\?":(\d+)/);
if (match) {
return parseInt(match[1]) * 100;
}
match = html.match(/\\"price\\":(\d+)/);
if (match) {
return parseInt(match[1]) * 100;
}
match = html.match(/"zestimate":(\d+)/);
if (match) {
return parseInt(match[1]) * 100;
}
match = html.match(/\\"zestimate\\":(\d+)/);
match = html.match(/\\?"price\\?":(\d+)/);
if (match) {
return parseInt(match[1]) * 100;
}