From 44e6a43cc4a16c9fff41658a8279d3406e634d18 Mon Sep 17 00:00:00 2001 From: Zachary Hampton Date: Mon, 21 Jul 2025 17:33:58 -0700 Subject: [PATCH] - fix none type error --- homeharvest/core/scrapers/realtor/processors.py | 6 +++++- pyproject.toml | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/homeharvest/core/scrapers/realtor/processors.py b/homeharvest/core/scrapers/realtor/processors.py index 0fc5af6..f172b13 100644 --- a/homeharvest/core/scrapers/realtor/processors.py +++ b/homeharvest/core/scrapers/realtor/processors.py @@ -175,7 +175,11 @@ def process_extra_property_details(result: dict, get_key_func=None) -> dict: nearby_schools = result.get("nearbySchools") schools = nearby_schools.get("schools", []) if nearby_schools else [] tax_history_data = result.get("taxHistory", []) - assessed_value = tax_history_data[0]["assessment"]["total"] if tax_history_data and tax_history_data[0].get("assessment", {}).get("total") else None + + assessed_value = None + if tax_history_data and tax_history_data[0] and tax_history_data[0].get("assessment"): + assessed_value = tax_history_data[0]["assessment"].get("total") + tax_history = tax_history_data if schools: diff --git a/pyproject.toml b/pyproject.toml index a7cb66b..05c7b97 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "homeharvest" -version = "0.5.1" +version = "0.5.2" description = "Real estate scraping library" authors = ["Zachary Hampton ", "Cullen Watson "] homepage = "https://github.com/Bunsly/HomeHarvest"