Created
January 2, 2019 13:33
-
-
Save wlkns/73c3df74334f78f1f3d9f95edff7ec39 to your computer and use it in GitHub Desktop.
Get the dates and totals of Uber trips (must be logged into Uber, use in Chrome console.)
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
| (function() { | |
| let amts = [], dates = []; | |
| Array.from(document.querySelectorAll('div.dh')).forEach(function(el) { | |
| let date_amount = el.querySelector('div.an'); | |
| dates.push(date_amount.querySelector('div:first-child').innerText.split(',')[0]); | |
| amts.push(date_amount.querySelector('div:last-child').innerText.replace('£', '')); | |
| }); | |
| console.log(amts.join("\n")) | |
| console.log(dates.join("\n")); | |
| })(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment