ExtraSpace
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