require 'rubygems'
require 'scrubyt'
ebay_data = Scrubyt::Extractor.define do
fetch 'http://www.ebay.com/'
fill_textfield 'satitle', 'ipod video 80gb'
submit
record_table "//table[@class='ebItemlist single']" do
record "//tr" do
item_name "/td[@class='ebcTtl']"
url("href", :type => :attribute)
url_detail do
click_link 'See detailed feedback'
record "//tr[@class='fbsBigLabel'][2]" do
feedback :ends_with => "%"
price "/td[@class='ebcPr']"
bids "/td[@class='ebcBid']"
end
end
end
end
end
ebay_data.to_xml.write($stdout, 1)