From 6a354e6252976dc04411e91decf9c8ea2822eaf0 Mon Sep 17 00:00:00 2001 From: Robert Dyer Date: Thu, 3 Apr 2025 22:12:26 -0500 Subject: [PATCH] add a fallback zestimate match pattern --- zestimate.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/zestimate.js b/zestimate.js index 469c91b..581c685 100644 --- a/zestimate.js +++ b/zestimate.js @@ -13,7 +13,11 @@ async function getZestimate(URL) { const html = await driver.wait(until.elementLocated(By.css('body')), 5000).getAttribute('innerHTML'); try { - const match = html.match(/"zestimate":"(\d+)"/); + let match = html.match(/"zestimate":"(\d+)"/); + if (match) { + return parseInt(match[1]) * 100; + } + match = html.match(/\\"zestimate\\":\\"(\d+)\\"/); if (match) { return parseInt(match[1]) * 100; }