EnsnareBnb
EnsnareBnb is a simple scraper designed to get listings from AirBNB in JSON format.
Installation
Add this line to your application's Gemfile:
gem 'ensnare_bnb'
And then execute:
$ bundle
Or install it yourself as:
$ gem install ensnare_bnb
Usage
United States
To find a city in the US, only city and country are required. To prevent inaccurate results for common city names (for example, Dover or St. Louis), provide the state name as well.
EnsareBnb.find_locations(
city: 'Seattle',
state: 'WA',
country: 'United States')
=> Returns JSON results of all AirBNB listings found in Seattle, WA.
Optional Fields
:start_date, :end_date :guests, :price_min, :price_max, :max_pages
--
Contributing
- Fork it ( https://github.com/[my-github-username]/ensnare_bnb/fork )
- 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 a new Pull Request