Hi,
i use the code to scrape google search results.
require ''rubygems''
require ''scrubyt''
google_data = Scrubyt::Extractor.define do
fetch ''http://www.google.nl/''
fill_textfield ''q'', ''ticket''
submit
link_title "//a[@class=''l'']", :write_text =>
true do
link_url
end
end
p google_data.to_hash
This output:
[{:link_url=>"http://www.ticketmaster.nl/",
:link_title=>"Ticketmaster.nl: Welkom"}
The next thing is to store the ranking based on their position
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---