This module written in Python3 simply connects to the HSBC online banking web page and fetches the list of your accounts with their balance.
It connects to the bank's portal of the selected country, fills the HTML forms automatically with given credentials, and fetches the account details.
The information is stored in files with the following formats:
- PNG (browser screenshot)
- PDF (saved web page)
- CSV (parsed account list)
You need Python3 installed with modules selenium and webdriver-manager.
pip3 install -r requirements.txt
Of course, you need a legit HSBC account (with credentials for online banking) either in France or Hong Kong.
You can simply run the program as follow:
python3 hsbc-web-client.py
However, you might appreciate the provided Makefile to avoid repetitive work.
You must first indicate your credentials in the file credentials.make
:
# credentials for your account in Hong Kong
LOGIN_HK=myself
PASSWORD_HK=********
# credentials for your account in France
LOGIN_FR=myself
PASSWORD_FR=********
Then, you must setup the environment for the country you want:
# environment for HSBC Hong Kong
eval `make env.hk`
# environment for HSBC France
eval `make env.fr`
Finally, you can invoke the target to run the program:
# run with the GUI in verbose mode and do not quit after logon
make debug
# run with no GUI in background and generate the report silently
make run
Other targets are available:
# install the program locally in the home directory
make install
# cleanup the files produced by runs or builds
make clean
All of this is just a demo and nothing else. It is not deliverable!
The code may break easily since the web portal may be updated anytime.
Your credentials are not protected since they are not encrypted and appear in clear in the terminal.
This program is free software. It comes without any warranty, to the extent permitted by applicable law. You can redistribute it and/or modify it under the terms of the Do What The Fuck You Want To Public License, Version 2, as published by Sam Hocevar.
See www.wtfpl.net for more details.
This program is distributed under the WTFPL license.
Copyright © 2023 Your Name odeblic@gmail.com
This work is free. You can redistribute it and/or modify it under the terms of the Do What The Fuck You Want To Public License, Version 2, as published by Sam Hocevar. See the COPYING file for more details.
A guy who wishes that everything can be accessed through an API, hence this project...
"Please do not do shady things with my code. You must be the owner of the account you are using."