Using Beautiful Soup to Gather Housing Data.
- Jason Ismail
- Apr 3, 2021
- 1 min read
Updated: May 24, 2021
Here is a my notebook for this project:
For this project I used Requests and Beautiful Soup to gather data off of a website then I cleaned it and stored it in a database so I could use it later.

Courtesy of https://nyssaskitchen.com
The data was gathered from https://www.greybeardrealty.com/
The goal was to find homes in Asheville NC near lake lure.
Here is an example listing:

I noticed that I could change their URL to include up to 750 listings by editing &r=1-750& in the following url. (Do note opening this directly may lag the website)
“Altering the URL allowed me to gather quite a bit of information off their website.”
I viewed the source code for the website and gathered some intel on where the data was stored.

I loaded the first record and started to work with it. Using what I learned I started to find the information that I needed.

Which produced the results I was looking for.

“I looped through my results and built my database.”
Before:

Of course the data needed to be cleaned up a bit. For instance sq_feet was text data that needed to be separated and formatted.
After:

Now my data was ready to work with.
Komentáře