bolig_ping.scraper
source module bolig_ping.scraper
Scraping homes available satisfying the given criteria.
Functions
-
scrape_results — Scrape the results of a home search query.
-
get_home_from_result — Get a home from a result.
source scrape_results(search_query: SearchQuery) → list[Home] | None
Scrape the results of a home search query.
Parameters
-
search_query : SearchQuery — The search query to scrape results for.
Returns
-
list[Home] | None — A list of homes that satisfy the search query, or None if no results were found.
Raises
-
HTTPError — If there was an error in the HTTP request.
source get_home_from_result(result: dict) → Home
Get a home from a result.
Parameters
-
result : dict — The result to get the home from.
Returns
-
Home — The home from the result.