Creating HTML Parsers has never been this simple. Here is how you can create parsers very quickly with minimal code. Do check out the "rasper" gem on RubyGems.
Tag: scraping
Hpricot scraping in ruby
Include gems/library required before getting startedrequire '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 hpricot library to get right contentsdoc.at("div.pageTitle")doc/"div.pageTitle"doc.search("div.entry")doc//"div.pageTitle"Hpricot API Reference click here