Compare commits

...

2 Commits

Author SHA1 Message Date
Cullen Watson
6076b0f961 enh: add agent (#68) 2024-04-16 15:09:32 -05:00
Cullen Watson
cdc6f2a2a8 docs: readme 2024-04-16 14:59:50 -05:00
3 changed files with 12 additions and 4 deletions

View File

@@ -128,14 +128,17 @@ Property
│ ├── sold_price
│ ├── last_sold_date
│ ├── price_per_sqft
│ ├── parking_garage
│ └── hoa_fee
├── Location Details:
│ ├── latitude
│ ├── longitude
── Parking Details:
└── parking_garage
── Agent Info:
│ ├── agent
│ ├── broker
│ └── broker_phone
```
### Exceptions

View File

@@ -141,6 +141,8 @@ class RealtorScraper(Scraper):
if days_on_mls and days_on_mls < 0:
days_on_mls = None
property_id = property_info["details"]["permalink"]
agents = self.get_agents(property_id)
listing = Property(
mls=mls,
mls_id=(
@@ -148,7 +150,7 @@ class RealtorScraper(Scraper):
if "source" in property_info and isinstance(property_info["source"], dict)
else None
),
property_url=f"{self.PROPERTY_URL}{property_info['details']['permalink']}",
property_url=f"{self.PROPERTY_URL}{property_id}",
status=property_info["basic"]["status"].upper(),
list_price=property_info["basic"]["price"],
list_date=list_date,
@@ -176,6 +178,7 @@ class RealtorScraper(Scraper):
stories=property_info["details"].get("stories"),
),
days_on_mls=days_on_mls,
agents=agents,
)
return [listing]
@@ -269,6 +272,7 @@ class RealtorScraper(Scraper):
}"""
variables = {"property_id": property_id}
agents = self.get_agents(property_id)
payload = {
"query": query,
@@ -286,6 +290,7 @@ class RealtorScraper(Scraper):
property_url=f"{self.PROPERTY_URL}{property_info['details']['permalink']}",
address=self._parse_address(property_info, search_type="handle_address"),
description=self._parse_description(property_info),
agents=agents,
)
]

View File

@@ -1,6 +1,6 @@
[tool.poetry]
name = "homeharvest"
version = "0.3.16"
version = "0.3.17"
description = "Real estate scraping library"
authors = ["Zachary Hampton <zachary@bunsly.com>", "Cullen Watson <cullen@bunsly.com>"]
homepage = "https://github.com/Bunsly/HomeHarvest"