Hermes is a web crawler which include Mechanize and PhantomJs.
Add this line to your application's Gemfile:
gem 'hermes', git: 'git@github.com:alexandrecolas/hermes.git'
And then execute:
$ bundle install
You can initialize a default user agent
Hermes.configure do |config|
config.user_agent = 'linux_firefox'
end- linux_firefox
- linux_konqueror
- linux_mozilla
- mac_firefox
- mac_mozilla
- Safari
- mac_safari
- windows_chrome
- windows_ie6
- windows_ie7
- windows_ie8
- windows_ie9
- windows_ie10
- windows_ie11
- windows_mozilla
- windows_firefox
- Safari
- ipad
- android
# Initialization
agent = Hermes::Agent.new
# set proxy
agent.set_proxy(address: '127.0.0.1', port: 9090, type: 'socks5')
# get agent
mechanize = @agent.mechanize # Mechanize
phantom = @agent.phantom # PhantomJS
http = @agent.http # Http- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request