HTML extraction using ruby

A

Arun Kumar

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
<a class="com_blue com_size12 com_arial12" href="">, these are the type
of urls i want to have.
Please help. I'll be really greatfull.

Regards,
Arun Kumar .C.M.
 
P

Phlip

Arun said:
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
<a class="com_blue com_size12 com_arial12" href="">, 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
 
A

Arun Kumar

Phlip said:
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 Kumar
 
P

Phlip

Arun said:
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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top