update the field being pulled for zestimates

This commit is contained in:
Robert Dyer
2026-02-01 12:36:01 -06:00
parent a4c85a76d5
commit 6ebcc1cc7a
+10 -2
View File
@@ -13,11 +13,19 @@ async function getZestimate(URL) {
const html = await driver.wait(until.elementLocated(By.css('body')), 5000).getAttribute('innerHTML');
try {
let match = html.match(/"zestimate":"(\d+)"/);
let match = html.match(/"price":(\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;
}
match = html.match(/"zestimate":(\d+)/);
if (match) {
return parseInt(match[1]) * 100;
}
match = html.match(/\\"zestimate\\":(\d+)/);
if (match) {
return parseInt(match[1]) * 100;
}