Compare commits

...

1 Commits

Author SHA1 Message Date
zacharyhampton
9a0cac650e Version bump to 0.8.16 2025-12-21 16:22:03 -07:00
3 changed files with 12 additions and 5 deletions

View File

@@ -126,6 +126,11 @@ class RealtorScraper(Scraper):
} }
if geo.get("area_type") == "address": if geo.get("area_type") == "address":
# Try to get mpr_id directly from API response first
if geo.get("mpr_id"):
result["mpr_id"] = geo.get("mpr_id")
else:
# Fallback: extract from _id field if it has addr: prefix
geo_id = geo.get("_id", "") geo_id = geo.get("_id", "")
if geo_id.startswith("addr:"): if geo_id.startswith("addr:"):
result["mpr_id"] = geo_id.replace("addr:", "") result["mpr_id"] = geo_id.replace("addr:", "")
@@ -169,7 +174,7 @@ class RealtorScraper(Scraper):
"""%s """%s
query GetHomeDetails($property_id: ID!) { query GetHomeDetails($property_id: ID!) {
home(property_id: $property_id) { home(property_id: $property_id) {
...HomeDetailsFragment ...SearchFragment
} }
}""" }"""
% HOME_FRAGMENT % HOME_FRAGMENT

View File

@@ -721,6 +721,7 @@ SEARCH_SUGGESTIONS_QUERY = """query Search_suggestions($searchInput: SearchSugge
geo { geo {
_id _id
_score _score
mpr_id
area_type area_type
city city
state_code state_code
@@ -764,6 +765,7 @@ SEARCH_SUGGESTIONS_QUERY = """query Search_suggestions($searchInput: SearchSugge
geo { geo {
_id _id
_score _score
mpr_id
area_type area_type
city city
state_code state_code

View File

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