Browze
A scraping-oriented browser-like wrapper around HTTParty for your cli tools.
Installation
Add this line to your application's Gemfile:
gem 'browze'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install browze
Usage Examples
browser = Browze.start
mobile_browser = Browze.start(:mobile)
browser.user_agent
browser.headers = { foo: 'bar' }
response = browser.get('https://www.google.com/')
response.parsed
browser.post(
'https://www.example.com/url.php',
param1: 'example',
param2: 'example'
)
browser.download('https://www.example.com/robots.txt')
browser.ip
browser.location
Development
After checking out the repo, run bundle install
to install dependencies. Then, run bundle exec rspec
to run the specs or bundle exec guard --clear
to keep them running during the development.
You can also run bin/console
for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install
.
License
The gem is available as open source under the terms of the MIT License.