This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
area = int(list(card.find(class_="card__property-amenity card__property-amenity--area"))[0] | |
.replace(" / sqft","").replace(",","")) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# here we define the function that we use to scrape the page | |
def scrape_page(soup,properties_list): | |
cards = soup.find_all('div', class_="card__content") | |
for card in cards: | |
# collect the description on the tag | |
try: | |
description = list(card.find('h2',class_="card__title card__title-link").children)[0] |
NewerOlder