Pulling out the individual data points

Now that we have all the divs with our listing data for each apartment, we need to pull out the individual data points for each apartments.

These are the points in each that we want to target:

  • URL of the listing
  • Address of the apartment
  • Neighborhood
  • Number of bedrooms
  • Number of bathrooms

Obviously, we love to have way more info—things such as square footage, for example, but we'll have to make do with what we have.

Let's begin by looking at the first listing:

listing_divs[0] 

The preceding code results in the following output:

Notice that this first div contains all of the data points we were looking ...

Get Python Machine Learning Blueprints - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.