refactor: scrape_property()

This commit is contained in:
Cullen Watson
2023-09-17 18:52:34 -05:00
parent 3697b7cf2d
commit 905cfcae2c
4 changed files with 87 additions and 67 deletions

View File

@@ -97,7 +97,9 @@ class ZillowScraper(Scraper):
else property_data["hdpUrl"]
)
address_data = property_data["address"]
address_one, address_two = cls._parse_address_two(address_data["streetAddress"])
address_one, address_two = self._parse_address_two(
address_data["streetAddress"]
)
address = Address(
address_one=address_one,
address_two=address_two,
@@ -106,7 +108,6 @@ class ZillowScraper(Scraper):
zip_code=address_data["zipcode"],
)
property_type = property_data.get("homeType", None)
print(property_type)
return Property(
site_name=self.site_name,