I have a simple ruby file that scraps a price off of walmart's site. I did a gem install scrapi and a gem install tidy. When I run my code on my windows 7 box I get the following error:
Error
c:/Ruby193/lib/ruby/gems/1.9.1/gems/scrapi-2.0.0/lib/scraper/reader.rb:216:in `r escue in parse_page': Scraper::Reader::HTMLParseError: didn't find tidy libs on your system. Please install tidy (http://tidy.sourceforge.net/) (Scraper::Reader ::HTMLParseError)
It appears that it can't find the tidy libraries, so I put it in my path:
Path=C:\Ruby193\lib\ruby\gems\1.9.1\gems\tidy_ffi-0.1.5\lib;C:\Ruby193\lib\ruby\gems\1.9.1\gems\tidy-1.1.2\lib
but it still throws the same can't find tidy libs error.
Thanks in advance for your help.
Code
require 'rubygems'
require 'scrapi'
require 'tidy'
scraper = Scraper.define do
process "div.firstRow div.priceAvail>div>div.PriceCompare>div.BodyS", :price => :text
result :price
end
url = URI.parse("http://www.walmart.com/search/search-ng.do?search_constraint=0&ic=48_0&search_query=LOST+third+season&Find.x=17&Find.y=1&Find=Find")
puts scraper.scrape(url)