mirror of
https://github.com/Bunsly/HomeHarvest.git
synced 2026-03-04 19:44:29 -08:00
- exclude_pending parameter
This commit is contained in:
@@ -21,6 +21,7 @@ class ScraperInput:
|
||||
date_to: str | None = None
|
||||
foreclosure: bool | None = False
|
||||
extra_property_data: bool | None = True
|
||||
exclude_pending: bool | None = False
|
||||
|
||||
|
||||
class Scraper:
|
||||
@@ -62,6 +63,7 @@ class Scraper:
|
||||
self.date_to = scraper_input.date_to
|
||||
self.foreclosure = scraper_input.foreclosure
|
||||
self.extra_property_data = scraper_input.extra_property_data
|
||||
self.exclude_pending = scraper_input.exclude_pending
|
||||
|
||||
def search(self) -> list[Property]: ...
|
||||
|
||||
|
||||
@@ -525,7 +525,7 @@ class RealtorScraper(Scraper):
|
||||
|
||||
is_pending = result["flags"].get("is_pending") or result["flags"].get("is_contingent")
|
||||
|
||||
if is_pending and self.listing_type != ListingType.PENDING:
|
||||
if is_pending and (self.exclude_pending and self.listing_type != ListingType.PENDING):
|
||||
return
|
||||
|
||||
property_id = result["property_id"]
|
||||
|
||||
Reference in New Issue
Block a user