Fix slower Zillow unit photo discovery path
This commit is contained in:
@@ -105,7 +105,7 @@ async function collectZillowStructuredPhotoCandidates(page) {
|
||||
return extractZillowStructuredPhotoCandidatesFromNextDataScript(scriptText || "");
|
||||
}
|
||||
|
||||
export async function extractZillowPhotos(rawUrl) {
|
||||
export async function extractZillowPhotos(rawUrl, options = {}) {
|
||||
const requestedUrl = parseTarget(rawUrl);
|
||||
const { context, page } = await createPageSession({ headless: process.env.HEADLESS !== "false" });
|
||||
const closeContext = async () => {
|
||||
@@ -177,6 +177,7 @@ export async function extractZillowPhotos(rawUrl) {
|
||||
};
|
||||
},
|
||||
{
|
||||
timeoutMs: Number(options.timeoutMs || 0) || undefined,
|
||||
onTimeout: closeContext
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user