https://github.com/ksylvest/nsastorage
A crawler for NSA Storage (https://www.nsastorage.com/)
https://github.com/ksylvest/nsastorage
ruby
Last synced: 4 months ago
JSON representation
A crawler for NSA Storage (https://www.nsastorage.com/)
- Host: GitHub
- URL: https://github.com/ksylvest/nsastorage
- Owner: ksylvest
- License: mit
- Created: 2024-12-11T18:21:54.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-09T22:44:04.000Z (about 1 year ago)
- Last Synced: 2025-06-09T23:30:31.763Z (about 1 year ago)
- Topics: ruby
- Language: Ruby
- Homepage: https://nsastorage.ksylvest.com/
- Size: 142 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# NSAStorage
[](https://github.com/ksylvest/nsastorage/blob/main/LICENSE)
[](https://rubygems.org/gems/nsastorage)
[](https://github.com/ksylvest/nsastorage)
[](https://nsastorage.ksylvest.com)
[](https://circleci.com/gh/ksylvest/nsastorage)
A Ruby library offering both a CLI and API for scraping [NSA Storage](https://www.nsastorage.com/) 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:pass@superproxy.zenrows.com: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"
```