NSAStorage

LICENSE RubyGems GitHub Yard CircleCI

A Ruby library offering both a CLI and API for scraping NSA Storage self-storage facilities and prices.

Installation

bash gem install nsastorage

Configuration

```ruby require ‘nsastorage’

NSAStorage.configure do |config| config.user_agent = ‘../..’ # ENV[‘NSASTORAGE_USER_AGENT’] config.timeout = 30 # ENV[‘NSASTORAGE_TIMEOUT’] config.proxy_url = ‘http://user:[email protected]:1337’ # ENV[‘NSASTORAGE_PROXY_URL’] end ```

Usage

```ruby require ‘nsastorage’

sitemap = NSAStorage::Facility.sitemap sitemap.links.each do |link| url = link.loc facility = NSAStorage::Facility.fetch(url:)

puts facility.text

facility.prices.each do |price| puts price.text end

puts end ```

CLI

bash nsastorage crawl

bash nsastorage crawl "https://www.nsastorage.com/storage/georgia/storage-units-norcross/1-Western-Hills-Ct-2"