Skip to content

Commit

Permalink
search complete message
Browse files Browse the repository at this point in the history
  • Loading branch information
AnthonyBloomer committed Apr 11, 2021
1 parent 7e4b500 commit 5ba60f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion daftlistings/daft.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,6 @@ def search(self, max_pages: Optional[int] = None) -> List[Listing]:
json=_payload)
listings = r.json()["listings"]
results_count = r.json()["paging"]["totalResults"]

total_pages = ceil(results_count / self._PAGE_SZ)
limit = min(max_pages, total_pages) if max_pages else total_pages

Expand Down Expand Up @@ -268,6 +267,7 @@ def search(self, max_pages: Optional[int] = None) -> List[Listing]:
listings = expanded_listings

self._total_results = len(listings)
print(f"Search complete. Found {self.total_results} listings.")

return [Listing(l) for l in listings]

Expand Down

0 comments on commit 5ba60f2

Please sign in to comment.