mirror of
https://github.com/Bunsly/HomeHarvest.git
synced 2026-03-04 19:44:29 -08:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9a0cac650e |
@@ -126,9 +126,14 @@ class RealtorScraper(Scraper):
|
||||
}
|
||||
|
||||
if geo.get("area_type") == "address":
|
||||
geo_id = geo.get("_id", "")
|
||||
if geo_id.startswith("addr:"):
|
||||
result["mpr_id"] = geo_id.replace("addr:", "")
|
||||
# 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", "")
|
||||
if geo_id.startswith("addr:"):
|
||||
result["mpr_id"] = geo_id.replace("addr:", "")
|
||||
|
||||
return result
|
||||
|
||||
@@ -169,7 +174,7 @@ class RealtorScraper(Scraper):
|
||||
"""%s
|
||||
query GetHomeDetails($property_id: ID!) {
|
||||
home(property_id: $property_id) {
|
||||
...HomeDetailsFragment
|
||||
...SearchFragment
|
||||
}
|
||||
}"""
|
||||
% HOME_FRAGMENT
|
||||
|
||||
@@ -721,6 +721,7 @@ SEARCH_SUGGESTIONS_QUERY = """query Search_suggestions($searchInput: SearchSugge
|
||||
geo {
|
||||
_id
|
||||
_score
|
||||
mpr_id
|
||||
area_type
|
||||
city
|
||||
state_code
|
||||
@@ -764,6 +765,7 @@ SEARCH_SUGGESTIONS_QUERY = """query Search_suggestions($searchInput: SearchSugge
|
||||
geo {
|
||||
_id
|
||||
_score
|
||||
mpr_id
|
||||
area_type
|
||||
city
|
||||
state_code
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "homeharvest"
|
||||
version = "0.8.15"
|
||||
version = "0.8.16"
|
||||
description = "Real estate scraping library"
|
||||
authors = ["Zachary Hampton <zachary@bunsly.com>", "Cullen Watson <cullen@bunsly.com>"]
|
||||
homepage = "https://github.com/ZacharyHampton/HomeHarvest"
|
||||
|
||||
Reference in New Issue
Block a user