I used Nokogiri as shown below:
require 'nokogiri' require 'open-uri'
But my bad due to company firewall maybe I get an error:
C:/Ruby193/lib/ruby/1.9.1/net/http.rb:762:in `initialize': getaddrinfo: No such host is known. (SocketError)
So, I thought that I would use selenium-webdriver for navigation and Nokogiri to work with the html web page source.
require "rubygems" require "selenium-webdriver" driver = Selenium::WebDriver.for :firefox driver.get "http://www.google.com/search?q=sparklemotion"
So, how do I transfer the contents of a web page (html) to Nokogiri ?
Please suggest me here.
source share