Created
October 31, 2021 11:53
-
-
Save fipso/850d0d1fcdb981acacb4d3e9c5aa4d4a to your computer and use it in GitHub Desktop.
csgoempire deposit calculator
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
import fetch from 'node-fetch'; | |
let deposit = 0; | |
//Insert the total amount of stats pages. (click last to see the number of the actual last one) | |
const MAX_PAGES = 10; | |
async function run() { | |
for (let i = 1; i < MAX_PAGES+1; i++) { | |
const res = await fetch("https://csgoempire.com/api/v2/user/transactions?page=" + i, { | |
"headers": { | |
"accept": "application/json, text/plain, */*", | |
"accept-language": "de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7,id;q=0.6,lb;q=0.5", | |
"cache-control": "no-cache", | |
"pragma": "no-cache", | |
"sec-fetch-dest": "empty", | |
"sec-fetch-mode": "cors", | |
"sec-fetch-site": "same-origin", | |
//Insert both. Crtl+Shift+I > Network > (Open the stats page on csgoempire) > copy the cookies and x-empire-device... form the transcations request | |
"x-empire-device-identifier": "", | |
"cookie": "", | |
"Referer": "https://csgoempire.com/", | |
"Referrer-Policy": "strict-origin-when-cross-origin" | |
}, | |
"body": null, | |
"method": "GET" | |
}); | |
const data = await res.json(); | |
for (let entry of Object.values(data.data)) { | |
if (entry.key.includes("deposit")) { | |
deposit += entry.delta / 100; | |
} | |
} | |
console.log(i, deposit); | |
} | |
console.log(deposit); | |
} | |
run().then(() => console.log("done")); | |
// now watch these to redeem your soul https://www.youtube.com/watch?v=_xaj8QSJZ0E |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment