Skip to main content

Simple Bank Korea PyPI version Build Status codecov.io

Simplest Transaction Crawler for Korea Banks

Requirements:

  • bs4 (BeautifulSoup4)
  • requests
  • python-dateutil
  • selenium
  • pillow (PIL)
  • PhantomJS Binary (Automatically Download, but libfontconfig is dependency on Linux)

Install

Install package with pip:

pip install -U simple_bank_korea

KB (Kookmin Bank)

Currently supports KB국민은행(Kookmin Bank) only.

Before Use

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.

Usage

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))

Require Args

  • 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)

Optional Args

  • 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. (If phantomjs is not in PATH, automatically download)
  • LOG_PATH: Path for phantomjs log file. Default is no logging.

Return types

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

Update Log

0.2.15 (2020-06-04)

  • HotFix bugs on setup.py

0.2.14 (2020-06-04)

  • Fix bugs #4: (downloaded) phantomJS permission error

0.2.13 (2020-06-04)

  • Fix bugs when downloading phantomjs.
    • Fix affects on Linux and macOS only.
  • Add Guide(OS, Progress) when dowloading phantomjs.

0.2.10 (2017-11-11)

  • Hot-fix: implicitly import to explicit relevant import to prevent ImportError

0.2.9 (2017-11-11)

  • Download PhantomJS Binary if phantomjs is not in PATH

0.2.8 (2017-09-18)

  • Add caching strategy (using temp folder with saving touch-keys)
  • Fix typo in v0.2.7

Release files for simple-bank-korea 0.2.15

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for simple-bank-korea 0.2.15
File Size Uploaded
simple_bank_korea-0.2.15.tar.gz 17.3 kB Details

Release files / simple_bank_korea-0.2.15.tar.gz

Download URL simple_bank_korea-0.2.15.tar.gz
Size 17.3 kB
Tags Source
SHA-256 checksum
How to use checksums
3dc68a33e3733fe041f603175f16e19a655ba5280285e3efc39eb6ffa6cffaa9
BLAKE2b-256 checksum
How to use checksums
5e5a3e5fa7856d643428283367ae9b241d2725cea83d7522d309ac0f889a8b5d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

Release history Release notifications | RSS feed

This release

0.2.15 This release

1 release file

0.2.14

1 release file

0.2.13

1 release file

0.2.12

1 release file

0.2.10

1 release file

0.2.9

1 release file

0.2.8

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page