Last active
August 29, 2015 14:06
-
-
Save elkhadiy/1d9cf954825b6dabb5c5 to your computer and use it in GitHub Desktop.
Get total amount of an amazon wish list for yurop people
This file contains hidden or 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 list = $$('span.a-color-price.a-size-base'); | |
var total = 0; | |
for (i = 0; i < list.length; i++) { | |
var price = parseFloat(list[i].innerHTML.replace('EUR', '') .replace(',', '.')); | |
total += price; | |
} | |
console.log("Total amount of items in wish list = ", total, "€"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment