[bugfix] if no district is passed, fetch data for all
This commit is contained in:
parent
56c203189f
commit
102c20ac42
1 changed files with 8 additions and 5 deletions
|
|
@ -28,11 +28,14 @@ async def dump_listings(
|
|||
parameters: QueryParameters,
|
||||
data_dir: pathlib.Path = pathlib.Path("data/rs/"),
|
||||
) -> list[Listing]:
|
||||
districts = {
|
||||
district: locid
|
||||
for district, locid in get_districts().items()
|
||||
if district in parameters.district_names
|
||||
}
|
||||
if parameters.district_names:
|
||||
districts = {
|
||||
district: locid
|
||||
for district, locid in get_districts().items()
|
||||
if district in parameters.district_names
|
||||
}
|
||||
else:
|
||||
districts = get_districts()
|
||||
print("Valid districts to scrape:", districts.keys())
|
||||
listings = []
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue