bofa_scraper
Bank of America does not currently have a consumer-facing API for requesting balance and transaction data. The goal of this project is to make personal data accessible to allow for automated budgeting projects.
This project includes a web scraper written in Python using Selenium. As such, this project is not capable of fetching any data that could not be collected by a human in a web browser. Please always take care to secure your account credentials!
Getting Started
- Install the package.
pip install bofa_scraper
- Install Firefox
- Download the GeckoDriver binary, and add to your PATH.
Usage
NOTE: API has been reworked since v0
Import and initialize
from bofa_scraper import BofAScraper # Import the package
scraper = BofAScraper(
'YOUR_BankOfAmerica_ONLINE_ID',
'YOUR_BankOfAmerica_PASSCODE',
timeout_duration=5, # Timeout to allow for page loads, defaults to 5s
headless=True, # Optional, defaults to True
verbose=True, # Optional, defaults to True
)
scraper.login() # Log in
Start scraping
# Fetch a list of accounts
# Transaction data is not automatically populated
accounts = scraper.get_accounts()
accounts[0].get_name() # See account name
accounts[0].get_balance() # See account balance
# Start a scraping session for an account
(
scraper.open_account(accounts[0]) # Start session
.scrape_transactions() # Scrape visible transactions
.load_more_transactions() # Load more transactions
.scrape_transactions() # Scrape new and re-scrape old transactions
.close() # Close session
)
# Dictionary populated with transactions
transactions = accounts[0].get_transactions()
# transaction info
transactions[0].amount
transactions[0].date
transactions[0].desc
transactions[0].type
transactions[0].uuid
Clean up
scraper.quit()
Security & Licensing
This project is licensed under the GNU General Public License 3.0 (GPLv3).
This project is intended for PERSONAL USE ONLY to document/calculate finances. Please take security into account when handling financial credentials.
Release files for bofa-scraper 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| bofa_scraper-1.0.2.tar.gz | 16.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| bofa_scraper-1.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 33.7 kB
Release files / bofa_scraper-1.0.2.tar.gz
| Download URL | bofa_scraper-1.0.2.tar.gz |
|---|---|
| Size | 16.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5fc56cea92d699644d1435795c04ab48314ddb6d81ba62030513733e19524733
|
|
BLAKE2b-256 checksum How to use checksums |
8240b45f0f859fcc2c8b8bf0f74db62fd87e20a8b912b333fe27cf1a540ea1bd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.6
|
Release files / bofa_scraper-1.0.2-py3-none-any.whl
| Download URL | bofa_scraper-1.0.2-py3-none-any.whl |
|---|---|
| Size | 17.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
408574811ec8b65e8ec753b5ded07b274a881128cb6957ebf1358b5c4b3e964c
|
|
BLAKE2b-256 checksum How to use checksums |
742c25f595f103a5c7c12c5a7d844cbb11732db82238b342fb3cdc39d3bef10f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.6
|