GithubHelp home page GithubHelp logo

carsomyrj / simple_bank_korea Goto Github PK

View Code? Open in Web Editor NEW

This project forked from beomi/simple_bank_korea

0.0 0.0 0.0 68 KB

simple crawler for Korean banks with Transactions

License: MIT License

Python 99.04% Shell 0.96%

simple_bank_korea's Introduction

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

simple_bank_korea's People

Contributors

beomi 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.