fixing full detail dumping

This commit is contained in:
Kadir 2025-02-16 03:02:21 +00:00
parent e0e7853c8c
commit 302ca95cfb
3 changed files with 16 additions and 4 deletions

View file

@ -163,6 +163,12 @@ class Listing:
def url(self):
return f"https://www.rightmove.co.uk/properties/{self.identifier}"
@property
def listingobject(self):
if self._cached is None:
with open(self.path_listing_json()) as f:
return json.load(f)
@property
def detailobject(self):
if self._cached is None:
@ -214,7 +220,7 @@ class Listing:
return (now - ds).days
@property
def last_seen(self) -> datetime.datetime:
def last_seen(self) -> int:
if not self.path_last_seen_listing().exists():
return None
@ -246,7 +252,7 @@ class Listing:
@property
def isRemoved(self) -> bool:
return not self.detailobject["property"]["visible"]
return not self.listingobject["visible"]
@property
def status(self) -> str: