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