Skip to content

Commit

Permalink
Merge pull request #555 from codders/bugfix/meinestadt-and-immobiliare
Browse files Browse the repository at this point in the history
Fix crawlers
  • Loading branch information
codders authored Mar 29, 2024
2 parents b38382f + d66289d commit 51fb7da
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions flathunter/crawler/immobiliare.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"})
Expand Down
2 changes: 1 addition & 1 deletion flathunter/crawler/meinestadt.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'])
Expand Down

0 comments on commit 51fb7da

Please sign in to comment.