convert district at the last moment - when we send the query
This commit is contained in:
parent
bcece4500a
commit
bf79d3c977
1 changed files with 3 additions and 2 deletions
|
|
@ -5,6 +5,7 @@ import enum
|
|||
from typing import Any
|
||||
import aiohttp
|
||||
from models.listing import FurnishType, ListingType, QueryParameters
|
||||
from rec import districts
|
||||
from tenacity import retry, wait_random
|
||||
|
||||
|
||||
|
|
@ -52,7 +53,7 @@ async def listing_query(
|
|||
radius: float,
|
||||
min_price: int,
|
||||
max_price: int,
|
||||
location_id: str, # = "STATION^5168", # kings cross station
|
||||
district: str, # = "STATION^5168", # kings cross station
|
||||
mustNewHome: bool = False,
|
||||
max_days_since_added: int = 30,
|
||||
property_type: list[PropertyType] = [],
|
||||
|
|
@ -60,7 +61,7 @@ async def listing_query(
|
|||
furnish_types: list[FurnishType] = [],
|
||||
) -> dict[str, Any]:
|
||||
params: dict[str, str] = {
|
||||
"locationIdentifier": location_id,
|
||||
"locationIdentifier": districts.get_districts()[district],
|
||||
"channel": str(channel).upper(),
|
||||
"page": str(page),
|
||||
"numberOfPropertiesPerPage": str(page_size),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue