diff --git a/flathunter/crawler/immobiliare.py b/flathunter/crawler/immobiliare.py index 2f3629dc..09c3f7b6 100644 --- a/flathunter/crawler/immobiliare.py +++ b/flathunter/crawler/immobiliare.py @@ -22,9 +22,7 @@ def extract_data(self, soup): results = soup.find( 'ul', {"class": "in-realEstateResults"}) - items = results.find_all(lambda l: l.has_attr( - 'class') and "in-realEstateResults__item" in l['class'] - and "in-realEstateResults__carouselAgency" not in l["class"]) + items = results.select("div.in-reListCard") for row in items: title_row = row.find('a', {"class": "in-reListCard__title"}) diff --git a/flathunter/crawler/meinestadt.py b/flathunter/crawler/meinestadt.py index 0f3bb33d..9aa5a2d4 100644 --- a/flathunter/crawler/meinestadt.py +++ b/flathunter/crawler/meinestadt.py @@ -81,7 +81,7 @@ def process_json_blob_to_expose(blob): 'url': apartment['url'], 'title': apartment['name'], 'id': int(apartment['url'].split('/')[-1]), - 'image': apartment['image'], + 'image': apartment.get('image', None), 'crawler': MeineStadt.__name__, 'address': MeineStadt.get_address(apartment), 'price': MeineStadt.get_price(blob['@graph'])