Skip to content

Instantly share code, notes, and snippets.

@lmmx
Created March 16, 2014 22:36
Show Gist options
  • Save lmmx/9590890 to your computer and use it in GitHub Desktop.
Save lmmx/9590890 to your computer and use it in GitHub Desktop.
get prices from eBay and format for csv in the console
var prices = document.querySelectorAll("#ResultSetItems > table > tbody > tr > td.prc > div.g-b.bidsold > span")
var pricelist = [];
var i;
for (i = 0; i<prices.length; i++)
{ pricelist.push(prices[i].innerHTML); }
// the pricelist variable now contains an array, which can be formatted better with:
var priceliststr = pricelist.toString().replace(/£/g,"")
// as far as I know it's not possible to write to CSV from the console, copy and paste works fine though
copy(priceliststr)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment