CubeSmart
A Ruby library offering both a CLI and API for scraping CubeSmart self-storage facilities and prices.
Installation
gem install extrapsace
Configuration
require 'cubesmart'
CubeSmart.configure do |config|
config.user_agent = '../..' # ENV['CUBESMART_USER_AGENT']
config.timeout = 30 # ENV['CUBESMART_TIMEOUT']
config.proxy_url = 'http://user:pass@superproxy.zenrows.com:1337' # ENV['CUBESMART_PROXY_URL']
end
Usage
require 'cubesmart'
sitemap = CubeSmart::Facility.sitemap
sitemap.links.each do |link|
url = link.loc
facility = CubeSmart::Facility.fetch(url:)
puts facility.text
facility.prices.each do |price|
puts price.text
end
puts
end
CLI
cubesmart crawl
cubesmart crawl "https://www.cubesmart.com/california-self-storage/los-angeles-self-storage/3844.html"