From: "lrlebron@..." Date: 2006-12-03T11:00:08+09:00 Subject: Re: Development hpricot breaks code Positive. The script works correctly with include? Does not work with index. Luis Trans wrote: > lrlebron@gmail.com wrote: > > I was using this simple script to parse some links from a web page > > > > require 'open-uri' > > require 'hpricot' > > > > strLink = "http://sportsline.com/nfl/scoreboard/2006/week9" > > > > @doc = Hpricot(open(strLink)) > > > > @doc.search("a").each do |a| > > > > if a.inner_html.include?"GameCenter" > > puts 'http://sportsline.com' + a.attributes['href'] > > end > > > > end > > Are sure you want to use 'include?' and not 'index' ? > > T.