Created
August 6, 2018 04:54
-
-
Save chrishol/1d4c4f25bbc5b6a29d1078dd5d3393f7 to your computer and use it in GitHub Desktop.
Clarity Money scrape
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
// 1. Add jQuery to the Chrome console | |
// -- jquerify.js | |
// -- https://github.com/bgrins/devtools-snippets | |
// 2. Log in to Clarity Money | |
// 3. Click transactions to pull up the transactions modal | |
// 4. (optional) Filter, or load more to get what you want | |
// 5. Run snippet in Chrome developer tools snippets | |
var output = ''; | |
var $items = jQuery('#modal .transaction-item-container'); | |
$items.each(function() { | |
var transactionDate = jQuery(this).prevAll('.date-bar')[0].innerText.trim(); | |
var transactionId = jQuery(this).find('.transaction-item').attr('data-id').trim(); | |
var transactionName = jQuery(this).find('.transaction-name')[0].innerText.trim(); | |
var transactionCategory = jQuery(this)[0].className.match(/category-.*/)[0].replace('category-', ''); | |
var transactionDollars = jQuery(this).find('.currency')[0].innerText.trim(); | |
output += transactionDate + '|'; | |
output += transactionId + '|'; | |
output += transactionName + '|'; | |
output += transactionCategory + '|'; | |
output += transactionDollars; | |
output += '\n'; | |
}) | |
console.log(output); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment