This gem demonstrate how to query yandex search engine via http and parse results.
Add this line to your application's Gemfile:
gem 'yareq', github: 'Rustik/yareq'
# dependencies -- because I didn't submit it into RubyGems I don't need to build it with it's dependencies
gem 'curb'
gem 'nokogiri'
gem 'addressable'
And then execute:
$ bundle
$ bundle exec yareq
Using command line:
$ bundle exec yareq
Inside your app:
require 'yareq'
y = Yareq::Request.new "ford", { lr: "2" }
y.process #=> [array of links]
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Added some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request