Created
April 3, 2022 16:25
-
-
Save carpogoryanin/4092a7ac191bc2b223316300c6b521fb to your computer and use it in GitHub Desktop.
VakifBank - Spent money
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
/* | |
How to check spent money in VakifBank for any period. | |
1. Go to: https://subesiz.vakifbank.com.tr/bireysel/en/area/hesaplar/vadesiz | |
2. Select Time Range (e.g. last 7 days) | |
3. Select Transaction type: Money outflows (to exclude income) | |
4. Run script below in Browser Console | |
*/ | |
var sum = 0; | |
var elements = document.querySelectorAll(".account-detail-table td:nth-child(3) .money"); | |
elements.forEach(element => { | |
var transaction = element.textContent.replace(' TL','').replace(' ','').replace('-','').replace('.','').replace(',','.')*1; | |
if (!!transaction) { | |
console.log(transaction, element.textContent); | |
sum += transaction; | |
} else { | |
console.log("wrong element:", element.textContent); | |
} | |
}); | |
console.log('Total spent:', sum); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment