HTML extraction using ruby


#1

Hi,
Can anybody tell me how to extract all the hyperlinks given in the
url:http://scores.sify.com/match/archive/archive.shtml using ruby. I
want the those urls having the class ‘com_blue com_size12 com_arial12’.
ie. to be more precise
, these are the type
of urls i want to have.
Please help. I’ll be really greatfull.

Regards,
Arun K. .C.M.


#2

Arun K. wrote:

Hi,
Can anybody tell me how to extract all the hyperlinks given in the
url:http://scores.sify.com/match/archive/archive.shtml using ruby. I
want the those urls having the class ‘com_blue com_size12 com_arial12’.
ie. to be more precise
, these are the type
of urls i want to have.

Use doc = Nokogiri::HTML( my_html ), then something like
doc.css(‘a.com_blue’).each


#3

Phlip wrote:

Arun K. wrote:

Hi,
Can anybody tell me how to extract all the hyperlinks given in the
url:http://scores.sify.com/match/archive/archive.shtml using ruby. I
want the those urls having the class ‘com_blue com_size12 com_arial12’.
ie. to be more precise
, these are the type
of urls i want to have.

Use doc = Nokogiri::HTML( my_html ), then something like
doc.css(‘a.com_blue’).each

Sorry that doesn’t work. Showing an error like this.

uninitialized constant Nokogiri (NameError)

Regards
Arun K.


#4

Arun K. wrote:

Sorry that doesn’t work. Showing an error like this.

uninitialized constant Nokogiri (NameError)

You are going to need to learn more Ruby before asking high-level
questions
about it.

What did Google tell you about Nokogiri, or RubyGems?