Created
March 16, 2014 22:36
-
-
Save lmmx/9590890 to your computer and use it in GitHub Desktop.
get prices from eBay and format for csv in the console
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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