Giter VIP home page Giter VIP logo

hsbc-scrape's Introduction

HSBC Scrape

Work in progress.

Purpose

To download old statement history from HSBC (UK)'s personal online banking, including downloading of the extended details of transactions.

Output

The script dumps each account to a JSON file with lots of data. Later I'll make scripts to convert this JSON to CSV and possibly OFX if I can be bothered. You can then import it into a spreadsheet or wherever.

Method

The script controls a web browser (probably firefox) via Selenium, doing all the hard, boring, repetative work for you. It is careful to follow the links/forms on the web pages rather than remembering URLs/etc in order to get around HSBC's history issues. It only loads one page at a time so as to not be disabled - this makes it slow but quite reliable. It dumps out the data frequently so as to make recovery simpler in case of crashes.

The script will prompt you for your internet banking ID, password and your One Time Password from your DIGIPASS device. It will then log you in to your internet banking using these details.

Security

You are responsible for your own security whilst using this software. Use it at your own risk. It's your responsibility to see if Selenium, Firefox, or any other software used by this software logs your data, and if so it's your responsibility to clear that data.

Do NOT use this software on an untrusted network or computer, it is NOT protected with encryption.

The software does NOT automatically log you out when things are done, so your session with HSBC still exists for a few minutes after the script exits. If this is a problem for you then don't use this software!

THE SOFTWARE IS PROVIDED β€œAS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Running

Install the dependencies:

npm install

Run selenium-standalone-server in one terminal, then run npm start in another and follow the prompts.

Faster, less secure method

To save time you can pass your internet banking ID/password as options, but beware - doing so may save them to your shell history:

./node_modules/.bin/coffee index.coffee -I IB0000000000 -p "correct horse battery staple"

PROTIP: check out HISTCONTROL in bash, particularly ignorespace to not log commands that start with a space. Check out this LinuxJournal article on HISTCONTROL.

Or if you use zsh then check out setopt histignorespace.

Bugs

Pull requests welcome, please keep them focussed and tight - don't merge a whole load of new features and a rewrite into one pull request!

hsbc-scrape's People

Contributors

benjie avatar bencevans avatar

Stargazers

 avatar  avatar John Rees avatar Ryan Murray avatar Ben Morris avatar Matt H avatar Dom Christie avatar Shivan Sornarajah avatar James Wade avatar Jaco Engelbrecht avatar Adrien Joly avatar James Titcumb avatar

Watchers

 avatar James Cloos avatar  avatar  avatar  avatar

hsbc-scrape's Issues

Readme advises bad practise

From the readme:

Follow the prompts. To save time you can pass your internet banking ID/password as options:

coffee index.coffee -I IB0000000000 -p "correct horse battery staple"

This is a bad idea because commands (at least in Linux, don't know about OSX) are stored in plaintext in ~/.bash_history, so if you did this, your password would be stored for some amount of time in that file, so I'd suggest removing this.

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.