Use high-res images and return all photos in GeoJSON

- Use maxSizeUrl instead of url for photo URLs (highest available
  resolution from Rightmove)
- Remove 5-photo cap in GeoJSON export — return all available photos
- Apply same fix to both streaming and model-based export paths,
  and to the listing detail API endpoint
This commit is contained in:
Viktor Barzin 2026-02-22 00:54:58 +00:00
parent e2c22f025f
commit d50d1c07f6
No known key found for this signature in database
GPG key ID: 0EB088298288D958
2 changed files with 14 additions and 6 deletions

View file

@ -604,14 +604,14 @@ async def get_listing_detail(
text_info = property_info.get("text", {})
description = text_info.get("description") if isinstance(text_info, dict) else None
# Extract photos
# Extract photos (prefer high-res maxSizeUrl)
photos_raw = property_info.get("images", [])
photos: list[dict] = []
if isinstance(photos_raw, list):
for img in photos_raw:
if isinstance(img, dict):
photos.append({
"url": img.get("url", ""),
"url": img.get("maxSizeUrl") or img.get("url", ""),
"caption": img.get("caption", ""),
"type": img.get("type", ""),
})