Archive for November 23, 2012

Using Google’s Xpath scraping with ebay for average cost.

Written by Arujei on . Posted in Latest

Well with Christmas shopping/selling on the way sometimes I like to get the average cost of something that has sold on ebay. Well instead of doing all that math of copy everything I see sold and dividing it by the number of items I copied. I went ahead and scrapped their data into a Google apps spreadsheet to get the answer.

Its easy to do.

1. Go to ebay search for something you want the average price on. Make sure you check “completed listings” within the “buying formats” preferences.

2. Once you get the results you want copy ebay address in your address bar.

3. Either open the Google spreadsheet here and replace the ebay address with your’s.

3b. Or you can make your spreadsheet and copy and paste this. Replacing the ebay address in quotes with your’s.

=average(ImportXML("","//div[@class='g-b bidsold']"))

Even though it goes off the page you can still copy it just fine :3


P.S. take a look at:
This is where I got the basic information on how to grab the data way back when I first found out about this.


RT @jenjavajunky: A mother and baby potoroo spotted at South Australia’s Cleland Wildlife Park enjoying a little snack in the sunshine. htt…

John Ramirez John Ramirez