Skip to content

Instantly share code, notes, and snippets.

@aviflombaum
Created December 29, 2008 18:39
Show Gist options
  • Save aviflombaum/41335 to your computer and use it in GitHub Desktop.
Save aviflombaum/41335 to your computer and use it in GitHub Desktop.
ebay_data = Scrubyt::Extractor.define do
fetch 'http://www.ebay.com/'
fill_textfield 'satitle', 'ipod'
submit
click_link 'Apple iPod'
record do
item_name 'APPLE NEW IPOD MINI 6GB MP3 PLAYER SILVER'
price '$71.99'
end
next_page 'Next >', :limit => 5
end
output:
<root>
<record>
<item_name>APPLE IPOD NANO 4GB - PINK - MP3 PLAYER</item_name>
<price>$149.95</price>
</record>
<record>
<item_name>APPLE IPOD 30GB BLACK VIDEO/PHOTO/MP3 PLAYER</item_name>
<price>$172.50</price>
</record>
<record>
<item_name>NEW APPLE IPOD NANO 4GB PINK MP3 PLAYER</item_name>
<price>$171.06</price>
</record>
<!-- another 200+ results -->
</root>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment