adding status and other fields
This commit is contained in:
parent
4dfbcc64c1
commit
f66007bc85
1 changed files with 13 additions and 1 deletions
|
|
@ -111,7 +111,7 @@ class Listing:
|
||||||
"estimated_sqm": estimated_sqm,
|
"estimated_sqm": estimated_sqm,
|
||||||
"text": model_output,
|
"text": model_output,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
with open(self.path_floorplan_ocr_json(), "w") as f:
|
with open(self.path_floorplan_ocr_json(), "w") as f:
|
||||||
json.dump(objs, f)
|
json.dump(objs, f)
|
||||||
|
|
@ -223,6 +223,17 @@ class Listing:
|
||||||
except:
|
except:
|
||||||
print(self.identifier)
|
print(self.identifier)
|
||||||
return False
|
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):
|
def dict_nicely(self):
|
||||||
return {
|
return {
|
||||||
|
|
@ -243,6 +254,7 @@ class Listing:
|
||||||
"development": self.development,
|
"development": self.development,
|
||||||
"tenure_type": self.tenure_type,
|
"tenure_type": self.tenure_type,
|
||||||
"updated_days": self.updateDaysAgo,
|
"updated_days": self.updateDaysAgo,
|
||||||
|
"status": self.status,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue