update the field being pulled for zestimates
This commit is contained in:
+10
-2
@@ -13,11 +13,19 @@ async function getZestimate(URL) {
|
|||||||
const html = await driver.wait(until.elementLocated(By.css('body')), 5000).getAttribute('innerHTML');
|
const html = await driver.wait(until.elementLocated(By.css('body')), 5000).getAttribute('innerHTML');
|
||||||
|
|
||||||
try {
|
try {
|
||||||
let match = html.match(/"zestimate":"(\d+)"/);
|
let match = html.match(/"price":(\d+)/);
|
||||||
if (match) {
|
if (match) {
|
||||||
return parseInt(match[1]) * 100;
|
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) {
|
if (match) {
|
||||||
return parseInt(match[1]) * 100;
|
return parseInt(match[1]) * 100;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user