Skip to content

Instantly share code, notes, and snippets.

@aXe1
Created December 30, 2017 20:58
Show Gist options
  • Save aXe1/c01cb69e627079a5a67702c2011d8095 to your computer and use it in GitHub Desktop.
Save aXe1/c01cb69e627079a5a67702c2011d8095 to your computer and use it in GitHub Desktop.
Steam data mining
// 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