I've been playing around with HPricot, but after a fair amount of searching, I've not been able to work this out.
I'm trying to parse a HTML page and find all tags with a href to an mp3 file. So far I've got
<ul>
<% @page.search('//a[@href*=mp3]').each do |link| %>
<li>
<%= link.inner_text %>
</li>
<% end %>
</ul>
which is working fine, and a regex, /href\s*=\s*\"([^\"]+)(.mp3)/
which also works. I'm just not sure how to combine the two.
Is there a good example, or documentation that someone could point me to in order to work out what I can do with the .search function.
Thanks