Skip to content

Commit

Permalink
Merge pull request #44 from Bunsly/fix_postal_search
Browse files Browse the repository at this point in the history
fix postal search to search just by zip
  • Loading branch information
cullenwatson committed Dec 2, 2023
2 parents ad13b55 + e17b976 commit f7e74cf
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions homeharvest/core/scrapers/realtor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,11 @@ def search(self):
"radius": "{}mi".format(self.radius),
}

elif location_type == "postal_code":
search_variables |= {
"postal_code": location_info.get("postal_code"),
}

else: #: general search, location
search_variables |= {
"city": location_info.get("city"),
Expand Down
4 changes: 2 additions & 2 deletions homeharvest/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@

ordered_properties = [
"property_url",
"primary_photo",
"alt_photos",
"mls",
"mls_id",
"status",
Expand All @@ -33,6 +31,8 @@
"stories",
"hoa_fee",
"parking_garage",
"primary_photo",
"alt_photos",
]


Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "homeharvest"
version = "0.3.10"
version = "0.3.11"
description = "Real estate scraping library supporting Zillow, Realtor.com & Redfin."
authors = ["Zachary Hampton <[email protected]>", "Cullen Watson <[email protected]>"]
homepage = "https://github.com/Bunsly/HomeHarvest"
Expand Down

0 comments on commit f7e74cf

Please sign in to comment.