New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

browze

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

browze

  • 0.1.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

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

# Instantiate the browser
browser = Browze.start

# By default the browser is instantiated with a desktop user agent. if you want
# to use a mobile user agent instead, start it with :mobile.
mobile_browser = Browze.start(:mobile)

# A random user agent is set automatically
# e.g.: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36"
browser.user_agent

# Set any custom headers
browser.headers = { foo: 'bar' }

# Perform a GET request
response = browser.get('https://www.google.com/')

# Return the parsed response body as a Nokogiri::HTML::Document
response.parsed

# Perform a POST request
browser.post(
  'https://www.example.com/url.php',
  param1: 'example',
  param2: 'example'
)

# Download a file and show a progress bar
browser.download('https://www.example.com/robots.txt')

# Show the current IP and geolocation
browser.ip       # => 75.152.126.127
browser.location # => Grande Prairie, Canada

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.

FAQs

Package last updated on 02 Dec 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc