Created
December 30, 2017 20:58
-
-
Save aXe1/c01cb69e627079a5a67702c2011d8095 to your computer and use it in GitHub Desktop.
Steam data mining
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
// Total money spent on steam. Not so smart: it just summarize "Total" column on current page. | |
// 1. Open in browser: | |
// https://store.steampowered.com/account/history/ | |
// 2. Open browser console: | |
// 1. Press `F12` | |
// 2. Choose `Console tab` | |
// 3. Paste the line below and press `Enter`. | |
console.log("Total spent: "+[...document.querySelectorAll(".wallet_table_row>.wht_total")].map(function(x){return parseFloat(x.textContent.trim().match(/^\S+/)[0].replace(",","."))}).reduce(function(a,b){return a+b}).toFixed(2)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment