Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Help with Hpricot and collect

Thread Tools

Help with Hpricot and collect

John Zoldiark
Posts: n/a
Hi and thanks for the help, I am new to ruby and I am trying to get some
data from a website using the Hpricot library.I am doing this: links =
Hpricot(index_page).search("td.det_movie").collect { |link| link["href"]
} to get an array of data but the thing is that right now I need some
text out of tags and the previous version only works with tags.
This is part of the code that I am reading, and I need the part that is
not in tags:

<table cellspacing="0" cellpadding="0" border="0" width="289">
<td height="5"/>
<td class="det_movie" align="left">6:25 9:20 p.m. (Mon./Fri.) 4:00 p.m.
(No previews) (Sat./Sun./Hol.) 1:00 p.m. (No previews) 3:30 p.m.</td>

the file is very large and I need all the objects with the

thanks for any help
Posted via

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
hpricot search help Junkone Ruby 2 03-17-2008 03:36 AM
Need help parsing HTML with Hpricot... Just Another Victim of the Ambient Morality Ruby 3 10-25-2007 07:49 AM
Please help unable to install hpricot gem Jose Boza Ruby 5 09-05-2007 07:00 PM
Hpricot Help Chih-Chao Lam Ruby 0 08-25-2006 06:33 PM
Need help with need to Force Garbage Collect John Java 1 08-19-2004 03:32 PM