Reliefweb Scraper

Reliefweb::Disaster is a subclass of Hashie::Mash, so you can do the following:

disaster = Reliefweb.featured_disasters.first
puts disaster["title"]
puts disaster.title
  • Run "rake featured_disasters:fetch" to see the disaster data
  • Run "rake spec" to run the rspec tests ** Note: run "rm spec/fixtures/vcr_cassettes/*.yml" if you want to re-record the vcr specs

Examples

Return an array of featured disasters:

Reliefweb.featured_disasters

History

  • version 0.2.0 - initial release
  • version 0.3.1 - updated to reflect new changes to the ReliefWeb website
  • version 0.4.0 - using new RSS feed from ReliefWeb, no need for GlideNumber anymore