Giter Site home page Giter Site logo

tiancho99 / bofa_scraper Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wllew4/bofa_scraper

0.0 0.0 0.0 40 KB

Simple Python web-scraper to get personal transaction data from BofA account.

Home Page: https://pypi.org/project/bofa-scraper

License: GNU General Public License v3.0

Python 100.00%

bofa_scraper's Introduction

bofa_scraper

version downloads

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

  1. Install the package.
pip install bofa_scraper
  1. Install Firefox
  2. 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.

bofa_scraper's People

Contributors

wllew4 avatar janellewatwit avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.