Fix slower Zillow unit photo discovery path

This commit is contained in:
2026-03-28 02:28:30 -05:00
parent 7690dc259b
commit 8fe451e8d0
11 changed files with 167 additions and 49 deletions

View File

@@ -64,7 +64,7 @@ async function collectListingUrl(page) {
});
}
export async function discoverZillowListing(rawAddress) {
export async function discoverZillowListing(rawAddress, options = {}) {
const address = String(rawAddress || "").trim();
const identity = parseAddressIdentity(address);
const searchUrl = `https://www.zillow.com/homes/${encodeURIComponent(buildZillowAddressSlug(address))}_rb/`;
@@ -125,6 +125,7 @@ export async function discoverZillowListing(rawAddress) {
};
},
{
timeoutMs: Number(options.timeoutMs || 0) || undefined,
onTimeout: closeContext
}
);