diff --git a/crawler/data_access.py b/crawler/data_access.py index 6de400c..007f4e8 100644 --- a/crawler/data_access.py +++ b/crawler/data_access.py @@ -310,6 +310,14 @@ class Listing: return self.detailobject['property']["councilTaxInfo"]["content"][0][ "value"] + @property + def photoThumbnail(self) -> str | None: + # options are: 'url', 'thumbnailUrl', 'maxSizeUrl' + photos = self.detailobject['property']['photos'] + if len(photos) > 0: + return photos[0]['url'] + return None + async def dict_nicely(self): travel_time_fastest = {} travel_time_second = {} @@ -366,6 +374,8 @@ class Listing: self.agency, "council_tax_band": self.councilTaxBand, + "photo_thumbnail": + self.photoThumbnail, } def __routing_cache_key(