adding status and other fields

This commit is contained in:
Kadir 2024-09-22 11:31:32 +01:00
parent 4dfbcc64c1
commit f66007bc85

View file

@ -111,7 +111,7 @@ class Listing:
"estimated_sqm": estimated_sqm,
"text": model_output,
}
)
)
with open(self.path_floorplan_ocr_json(), "w") as f:
json.dump(objs, f)
@ -223,6 +223,17 @@ class Listing:
except:
print(self.identifier)
return False
@property
def isRemoved(self) -> bool:
return not self.detailobject["property"]["visible"]
@property
def status(self) -> str:
if self.isRemoved:
return 'removed'
status = self.detailobject["property"]["status"]
return status
def dict_nicely(self):
return {
@ -243,6 +254,7 @@ class Listing:
"development": self.development,
"tenure_type": self.tenure_type,
"updated_days": self.updateDaysAgo,
"status": self.status,
}