Tag Archives: rio

Hpricot scraping in ruby

Include gems/library required before getting started require ‘hpricot’require ‘net/http’require ‘rio’ # Pass website url to be scrapedurl = “www.funonrails.com”# Define filename to store file locallyfile = “temp.html”# Save page locallyrio(url) < rio (file) # Open page through hpricotdoc = Hpricot(open(file))Apply … Continue reading

Posted in Ruby | Tagged , , | 1 Comment