Requirements:
- bs4 (BeautifulSoup4)
- requests
- python-dateutil
- selenium
- pillow (PIL)
- PhantomJS Binary (Automatically Download, but
libfontconfig
is dependency on Linux)
Install package with pip:
pip install -U simple_bank_korea
Currently supports KB국민은행(Kookmin Bank) only.
You must activate '빠른조회' service for each banks.
check this: https://obank.kbstar.com/quics?page=C025255&cc=b028364:b028702&QSL=F#
You can only use service('빠른조회')-registered bank accounts.
Import functions from each bank:
from simple_bank_korea.kb import get_transactions
# get_transactions returns list of dicts
# like this:
# [{'transaction_by': '', 'date': datetime.datetime(2017, 9, 11, 12, 39, 42), 'amount': 50, 'balance': 394}]
# example
transaction_list = get_transactions(
bank_num='47380204123456',
birthday='941021',
password='5432',
# days=30, # Optional, default is 30
# PHANTOM_PATH='/Users/beomi/bin/phantomjs', # Optional, default is 'phantomjs' only.
# LOG_PATH='/Users/beomi/phantom.log' # Optional, default is os.path.devnull (no log)
)
for trs in transaction_list:
print(trs['date'], trs['amount'], trs['transaction_by'])
get_transactions()
needs bank_num
, birthday
and password
. and optionally you can use days
arg for specific days from today.(default is 30days(1month))
bank_num
: Your account number. (String)birthday
: Your birthday with birth year(if 1994/10/21, do '941021'), 6 digits. (String)password
: Your bank account password. (String)
days
: Days you want to get datas. Default is 30 days. (Integer)PHANTOM_PATH
: Your PhantomJS Binary file Location. Default is 'phantomjs', expecting registered in PATH. (Ifphantomjs
is not in PATH, automatically download)LOG_PATH
: Path for phantomjs log file. Default is no logging.
get_transactions()
returns list of dicts, and each dict has date
, amount
, balance
and transaction_by
.
-
get_transactions()
: returns list of transaction dicts. -
date
: datetime -
amount
: int -
balance
: int -
transaction_by
: str
- HotFix bugs on
setup.py
- Fix bugs #4: (downloaded) phantomJS permission error
- Fix bugs when downloading phantomjs.
- Fix affects on Linux and macOS only.
- Add Guide(OS, Progress) when dowloading phantomjs.
- Hot-fix: implicitly import to explicit relevant import to prevent
ImportError
- Download PhantomJS Binary if
phantomjs
is not in PATH
- Add caching strategy (using temp folder with saving touch-keys)
- Fix typo in v0.2.7