reduce size of json by pulling interesting fields above instead of relying on the entire thing

This commit is contained in:
Viktor Barzin 2025-06-09 21:31:15 +00:00
parent 296a4e7603
commit 073020c6d2
No known key found for this signature in database
GPG key ID: 4056458DBDBF8863
3 changed files with 139092 additions and 4 deletions

View file

@ -33,9 +33,12 @@ async def export_immoweb(
"last_seen": listing.last_seen.isoformat(),
"price_history": [item.to_dict() for item in listing.price_history],
"agency": listing.agency,
# Additional info; the above is GeoJSON format
# Below is all other crap we want in the UI
"info": listing.additional_info,
"available_from": listing.additional_info["property"].get(
"letDateAvailable", None
),
# All other crap can be found in additional_info
# Prefer pulling out fields here instead of exporting the entire additional_info
# "info": listing.additional_info,
},
"geometry": {
"coordinates": [

139085
immoweb/data/london_geojs.js Normal file

File diff suppressed because it is too large Load diff

View file

@ -237,7 +237,7 @@ function getPropertyHTML(property) {
<div>
<img src="${property.properties.photo_thumbnail}" style="width:100%; height:auto;">
<p>
<strong>Available from:</strong> ${property.properties.info.property.let_date_available}
<strong>Available from:</strong> ${property.properties.available_from}
<br />
<strong>Price:</strong> £${property.properties.total_price}
<br />