Craigslist Monitor using Ruby


To add to my ever expanding knowledge base of languages, I decided to spend the last day and a half teaching myself Ruby and this was the result. A script to watch Craigslist for relevant posts so you don’t have to. My first ever Ruby program.

Watching Craigslist can be a time-consuming task. The script automates searching for housing, sales, services, jobs, and gigs, and emails you when it find something that matches your search criteria. It also works across multiple cities, since it’s controlled by the RSS feeds you configure it with.


Instead of sending Craigslist a server-side query, I decided to just get the RSS feed and filter the results on the client-side. There are two advantages of this — server changes don’t break the code and you can watch other feeds in a similar way (e.g. eBay).


Edit the monitor.yml file to your liking. It should look something like this:

include: software, developer, computer, programmer
exclude: freelance, internship, supplement, contract
  port: 587
  user_name: 'a_username'
  password: 'a_password'


clockwork monitor.rb

That’s it. if you want to log the output:

clockwork monitor.rb > monitor.log

Press CTRL+C to exit

Downloads 19 Sep 2014 3 KB

Leave a Reply

Your email address will not be published. Required fields are marked *