Skip to content

Instantly share code, notes, and snippets.

@chrishol
Created August 6, 2018 04:54
Show Gist options
  • Save chrishol/1d4c4f25bbc5b6a29d1078dd5d3393f7 to your computer and use it in GitHub Desktop.
Save chrishol/1d4c4f25bbc5b6a29d1078dd5d3393f7 to your computer and use it in GitHub Desktop.
Clarity Money scrape
// 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