Trust embedded Zillow photo sets without visible count

This commit is contained in:
2026-03-28 03:40:50 -05:00
parent 446d43cc78
commit ece8fc548f
5 changed files with 86 additions and 7 deletions

View File

@@ -182,6 +182,7 @@ node zillow-photos.js "https://www.zillow.com/homedetails/4141-Whiteley-Dr-Corpu
What it does:
- opens the listing page with CloakBrowser
- first checks whether the rendered listing shell already exposes a complete photo set in Zillow's embedded `__NEXT_DATA__` payload
- if the visible `See all XX photos` count is missing, still trusts the embedded set when the page metadata confirms the count or when the embedded set is already clearly substantial
- only tries the `See all photos` / `See all X photos` entry point when the initial structured data is incomplete
- returns direct `photos.zillowstatic.com` image URLs as JSON
- fails fast with a timeout if the browser-backed extraction stalls