Extra Space

LICENSE RubyGems GitHub Yard CircleCI

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

Installation

gem install extraspace

Configuration

require 'extraspace'

ExtraSpace.configure do |config|
  config.user_agent = '../..' # ENV['EXTRASPACE_USER_AGENT']
  config.timeout = 30 # ENV['EXTRASPACE_TIMEOUT']
end

Usage

require 'extraspace'

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

  puts facility.text

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

  puts
end

CLI

extraspace crawl
extraspace crawl "https://www.extraspace.com/storage/facilities/us/california/los_angeles/900113/"