Skip to content

Commit

Permalink
Merge pull request #503 from codders/bugfix/immobiliare-changes
Browse files Browse the repository at this point in the history
Update Immobiliare Crawler
  • Loading branch information
codders authored Oct 20, 2023
2 parents f181a96 + 9f6dd75 commit ea760e1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions flathunter/crawler/immobiliare.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ def extract_data(self, soup):
and "in-realEstateResults__carouselAgency" not in l["class"])

for row in items:
flat_id = row['id'].replace("link_ad_", "")
title_row = row.find('a', {"class": "in-card__title"})
title_row = row.find('a', {"class": "in-reListCard__title"})
title = title_row.text.strip()
url = title_row['href']
flat_id = title_row['href'].split("/")[-2:][0]

image_item = row.find_all('img')
image = image_item[0]['src'] if image_item else ""
Expand All @@ -40,10 +40,10 @@ def extract_data(self, soup):
# 1: number of rooms
# 2: size of the apartment
details_list = row.find(
"ul", {"class": "in-realEstateListCard__features"})
"ul", {"class": "in-reListCard__features"})

price_li = row.find(
"div", {"class": "in-realEstateListCard__priceOnTop"})
"div", {"class": "in-reListCardPrice"})

price_re = re.match(
r".*\s([0-9]+.*)$",
Expand Down

0 comments on commit ea760e1

Please sign in to comment.