Last active
March 26, 2020 04:48
-
-
Save mageddo/c31b7483f667b9a441ece49f7049ad70 to your computer and use it in GitHub Desktop.
Steam wishlist JSON generator
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 games = []; | |
jQuery(".wishlist_row").each(function(){ | |
games.push(toGame(jQuery(this))); | |
}); | |
var str = ""; | |
games.forEach(it => { | |
str += it.name + "\t" + it.originalPrice + "\t" + it.price + "\n"; | |
}); | |
console.log(str); | |
function toGame(o){ | |
return { | |
name: o.find(".title").text().trim(), | |
originalPrice: o.find(".discount_original_price").text().trim(), | |
price: o.find(".discount_final_price").text().trim(), | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment