Room-Bot: Automating Apartment Search
Overview
Looking for an apartment can be such a drag. You always have to keep an eye out for any new postings. So when I was looking for a new place in April 2019, I decided to make a fun weekend learning project out of it. As one of the websites that I often use to look for housing doesn’t have an alert functionality, I created a Slackbot that would send me a phone alert as soon as a new posting was created.
Using Selenium, I wrote a web crawler for the site. I stored the data on all the places available for rent in a google spreadsheet. Everytime the site is scraped, a new list of places is stored and compared with the previous dataset. The data that does not match is the new posting for which an alert has to be sent using the Slackbot. Using a Raspberry Pi, a cron job was set to run this program periodically.
The challenges in this project was mainly in integrating the APIs (from google sheets and the Slack API). This project also taught me how to properly structure a Python executable program. If not structured well, the program won’t be run properly by the cron job.
Screenshot of slackbot alert.
Tech Stack
- Python
- Raspberry Pi
- Slack
- Google Sheets (as database)