migrate immoweb exporter to use models
This commit is contained in:
parent
e317d2ec54
commit
3785d01009
5 changed files with 94 additions and 22 deletions
|
|
@ -329,7 +329,6 @@ def export_immoweb(
|
|||
last_seen_days: int,
|
||||
min_sqm: int | None = None,
|
||||
):
|
||||
# use model
|
||||
query_parameters = QueryParameters(
|
||||
listing_type=ListingType[type],
|
||||
district_names=set(district),
|
||||
|
|
@ -343,9 +342,10 @@ def export_immoweb(
|
|||
min_sqm=min_sqm,
|
||||
)
|
||||
click.echo(
|
||||
f"Exporting data to {output_file} that matches the query parameters: {query_parameters}"
|
||||
f"Exporting data to {output_file} for listings stored in {engine.url} that match the query parameters: {query_parameters}"
|
||||
)
|
||||
asyncio.run(export_immoweb_ui(ctx, output_file, query_parameters))
|
||||
repository = ListingRepository(engine=engine)
|
||||
asyncio.run(export_immoweb_ui(repository, output_file, query_parameters))
|
||||
|
||||
|
||||
@cli.command()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue