diff --git a/zestimate.js b/zestimate.js index 4201598..6b5861f 100644 --- a/zestimate.js +++ b/zestimate.js @@ -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; }