NOTE: Scraping is legal gray area.THis script is permissible if your run it to get your own data. Do not reproduce for shady/sus ඞ stuff
-
Make sure Yarn is Installed. As is NPM.
-
Git clone this repo
git clone https://github.com/daggy1234/transact-scrape
cd transact-scrape
- RUn Setup
yarn install
yarn playwright install
- Your Script is ready to use
-
Close currently running chrome and close all tabs.
-
Launch Chrome Debug Mode
- Macos
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222
- Windows
Try this.
& "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --remote-debugging-port=9222
If not try this
& "$env:LOCALAPPDATA\Google\Chrome\Application\chrome.exe" --remote-debugging-port=9222
-
Visit
https://duke-sp.transactcampus.com/eAccounts/AccountTransaction.aspx
and it should be your only open tab. (Basically leftmost tab in first window). Login untill you get to date selection screen. -
RUn script with
yarn run scrape
-
Let it run, it'll take like ~5-10 minutes cause transact fucking sucks L.
Run this to merge them into combined transact_data.json
yarn merge
Drop your processed json into a google drive. I will then run a verycool:tm: python script that will turn the html into CSV. We will remove your card number trust.