From 20ce44fb3ab72d0ca346be38ba3066933be73bad Mon Sep 17 00:00:00 2001 From: Zachary Hampton <69336300+ZacharyHampton@users.noreply.github.com> Date: Tue, 19 Sep 2023 10:37:10 -0700 Subject: [PATCH] - redfin limiting bug fix --- homeharvest/core/scrapers/redfin/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/homeharvest/core/scrapers/redfin/__init__.py b/homeharvest/core/scrapers/redfin/__init__.py index d591fce..e2fb0d8 100644 --- a/homeharvest/core/scrapers/redfin/__init__.py +++ b/homeharvest/core/scrapers/redfin/__init__.py @@ -109,7 +109,7 @@ class RedfinScraper(Scraper): ) def _handle_rentals(self, region_id, region_type): - url = f"https://www.redfin.com/stingray/api/v1/search/rentals?al=1&isRentals=true®ion_id={region_id}®ion_type={region_type}" + url = f"https://www.redfin.com/stingray/api/v1/search/rentals?al=1&isRentals=true®ion_id={region_id}®ion_type={region_type}&num_homes=100000" response = self.session.get(url) response.raise_for_status() @@ -230,9 +230,9 @@ class RedfinScraper(Scraper): return self._handle_rentals(region_id, region_type) else: if self.listing_type == ListingType.FOR_SALE: - url = f"https://www.redfin.com/stingray/api/gis?al=1®ion_id={region_id}®ion_type={region_type}" + url = f"https://www.redfin.com/stingray/api/gis?al=1®ion_id={region_id}®ion_type={region_type}&num_homes=100000" else: - url = f"https://www.redfin.com/stingray/api/gis?al=1®ion_id={region_id}®ion_type={region_type}&sold_within_days=30" + url = f"https://www.redfin.com/stingray/api/gis?al=1®ion_id={region_id}®ion_type={region_type}&sold_within_days=30&num_homes=100000" response = self.session.get(url) response_json = json.loads(response.text.replace("{}&&", "")) homes = [