Skip to content

Commit

Permalink
Merge pull request #10 from adamvalt/fix/crashing-on-bezrealitky-miss…
Browse files Browse the repository at this point in the history
…ing-img

The program crashes when bezrealitky scraper has missing image value
  • Loading branch information
janchaloupka authored Mar 4, 2024
2 parents b8f15c2 + 58a7a9d commit 936ec8c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/scrapers/scraper_bezrealitky.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def get_latest_offers(self) -> list[RentalOffer]:
title=item["imageAltText"],
location=item["address"],
price=f"{item['price']} / {item['charges']}",
image_url=item["mainImage"]["url"],
image_url=item["mainImage"]["url"] if item["mainImage"] else "",
)
for item in response["data"]["listAdverts"]["list"]
]

0 comments on commit 936ec8c

Please sign in to comment.