Skip to content

Commit

Permalink
- redfin limiting bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ZacharyHampton committed Sep 19, 2023
1 parent 52017c1 commit 20ce44f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions homeharvest/core/scrapers/redfin/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def get_value(key: str) -> Any | None:
)

def _handle_rentals(self, region_id, region_type):
url = f"https://www.redfin.com/stingray/api/v1/search/rentals?al=1&isRentals=true&region_id={region_id}&region_type={region_type}"
url = f"https://www.redfin.com/stingray/api/v1/search/rentals?al=1&isRentals=true&region_id={region_id}&region_type={region_type}&num_homes=100000"

response = self.session.get(url)
response.raise_for_status()
Expand Down Expand Up @@ -230,9 +230,9 @@ def search(self):
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&region_id={region_id}&region_type={region_type}"
url = f"https://www.redfin.com/stingray/api/gis?al=1&region_id={region_id}&region_type={region_type}&num_homes=100000"
else:
url = f"https://www.redfin.com/stingray/api/gis?al=1&region_id={region_id}&region_type={region_type}&sold_within_days=30"
url = f"https://www.redfin.com/stingray/api/gis?al=1&region_id={region_id}&region_type={region_type}&sold_within_days=30&num_homes=100000"
response = self.session.get(url)
response_json = json.loads(response.text.replace("{}&&", ""))
homes = [
Expand Down

0 comments on commit 20ce44f

Please sign in to comment.