Project

vrbo

0.0
No commit activity in last 3 years
No release in over 3 years
Scrapes a VRBO calendar using Mechanize and returns available dates
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
>= 0
~> 3.3
~> 1.2
~> 2.9
~> 1.21

Runtime

 Project Readme

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

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request