B
Becca Girl
Hello.
I have a page that I get in mechanize.
I can view all of the links on the page, but I actually only want to get
some of the links on the page.
How can I grab only what I need?
The source code looks like this:
<div class="details">
<a href="website/unique_link/id">link</a>
</div>
I want to get the url for each of the details classes or get only the
url's that contain "unique_link" in the them.
Right now I'm using this code to get all of the results.
search_results.links.each.do |link|
puts link.text
end
THANKS!
I have a page that I get in mechanize.
I can view all of the links on the page, but I actually only want to get
some of the links on the page.
How can I grab only what I need?
The source code looks like this:
<div class="details">
<a href="website/unique_link/id">link</a>
</div>
I want to get the url for each of the details classes or get only the
url's that contain "unique_link" in the them.
Right now I'm using this code to get all of the results.
search_results.links.each.do |link|
puts link.text
end
THANKS!