if a.inner_html.include?"GameCenter"
puts 'http://sportsline.com' + a.attributes['href']
end
end
The script worked fine with the stable gem (0.4) but breaks with the
development gem (4.76). Unfortunately, I cannot find any documentation
that tells me what has changed between them
if a.inner_html.include?"GameCenter"
puts 'http://sportsline.com' + a.attributes['href']
end
end
The script worked fine with the stable gem (0.4) but breaks with the
development gem (4.76). Unfortunately, I cannot find any documentation
that tells me what has changed between them
On Sun, Dec 03, 2006 at 10:35:05AM +0900, lrlebron@gmail.com wrote:
The script worked fine with the stable gem (0.4) but breaks with the
development gem (4.76). Unfortunately, I cannot find any documentation
that tells me what has changed between them
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' ?
> The script worked fine with the stable gem (0.4) but breaks with the
> development gem (4.76). Unfortunately, I cannot find any documentation
> that tells me what has changed between them
Hey, thanks, this was a problem with script tags found inside javascript blocks.
Speaking particularly of, uh, this here at line 534:
<SCRIPT LANGUAGE="JavaScript">
var tcdacmd="dt";
if (switchTacoda != 'off') {
document.write('<script src="Registered & Protected by MarkMonitor;
language="JavaScript"><\/script>');
}
</SCRIPT>