From 867694ce9ae5a59970569e8f8512c6e6a3f7a0d1 Mon Sep 17 00:00:00 2001 From: Robert Dyer Date: Thu, 21 May 2026 15:27:24 -0500 Subject: [PATCH] fix issue with zestimate sometimes returning 0 --- zestimate.js | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/zestimate.js b/zestimate.js index 6b5861f..2763512 100644 --- a/zestimate.js +++ b/zestimate.js @@ -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; }