PublicStorage
Installation
gem install publicstorage
Configuration
require 'publicstorage'
PublicStorage.configure do |config|
config.user_agent = '../..' # ENV['PUBLICSTORAGE_USER_AGENT']
config.timeout = 30 # ENV['PUBLICSTORAGE_TIMEOUT']
end
Usage
require 'publicstorage'
sitemap = PublicStorage::Facility.sitemap
sitemap.links.each do |link|
url = link.loc
facility = PublicStorage::Facility.fetch(url:)
puts facility.text
facility.prices.each do |price|
puts price.text
end
puts
end
CLI
publicstorage crawl