Skip to content

Instantly share code, notes, and snippets.

@ahhammoud
ahhammoud / scrape_area.py
Last active April 6, 2020 20:29
scrapes the area off a propertyfinder.ae listing and converts in to an integer
area = int(list(card.find(class_="card__property-amenity card__property-amenity--area"))[0]
.replace(" / sqft","").replace(",",""))
@ahhammoud
ahhammoud / scrape_card.py
Created April 6, 2020 20:17
scrapes the information of a listings card from propertyfinder.ae
# 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]