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,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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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"
|
||||||
|
|||||||
Reference in New Issue
Block a user