VRBO Calendar Scraper
Uses mechanize to scrape a VRBO calendar and return a list of available dates. For instance, the gem can scrape this calendar: http://www.vrbo.com/293021/calendar
Installation
$ gem install vrbo
Usage
Specify the VRBO calendar ID in an initializer:
# config/initializers/vrbo.rb
VRBO.configure do |config|
config.calendar_id = 293021
end
Lookup available dates:
calendar = VRBO::Calendar.new
calendar.available_dates #=> ["2015-11-03", "2015-11-04", "2015-11-05", ...]
Check availability:
calendar.available?(Date.today, Date.today + 5) #=> true/false
Multiple Calendars
In the case of multiple calendars it makes more sense to skip the initializer part and pass the the calendar ID on initialization:
VRBO::Calendar.new 293021
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request