A gem to scrape craiglist data , use at own risk.
This gem does not work if hosted on heroku or ec2 , it appears craiglist blocks requests coming from them.
Add this line to your application's Gemfile:
gem 'craigslist_scraper'
And then execute:
$ bundle
Or install it yourself as:
$ gem install craigslist_scraper
craigslist = CraigsList.new
craigslist.search_boulder_for "vegan flip flops"
defaults to searching the entire post you can also search in just the titles
craigslist.search_titles_in_denver_for "vegan flip flops"
[{
data_id: "314159265359",
decsription: "vegan flip flops made out of tofu",
url: "http://denver.craigslist.org/42.html,
price: 5
}]
craigslist = CraigsList.new
craigslist.search_miami_for "white aligator shoes".average_price #=> 200
craigslist = CraigsList.new
craigslist.search_losangeles_for "pretentious handbag".median_price #=> 700
craigslist.search_dallas_for "a NoBama bumper sticker"
craigslist.search_lasvegas_for "gold chains and workout jumpsuit"
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)