DBS Statement Downloader
Python library that logs into the DBS iBanking frontend and download estatements using Selenium.
Since logging into the frontend requires an OTP, text-forwarding (independent of this repository) is used to send the contents of the SMS to a Gmail service account. This OTP is then passed to the Selenium browser.
Requests are then made to the undocumented DBS backend API (https://internet-banking.dbs.com.sg/api/v3/channels/estatements) to retrieve the relevant bank statements.
Install
Clone the repo
git clone https://github.com/benjamin-awd/dbs-statement-downloader.git
Install dependencies using Homebrew and poetry
brew install poetry
poetry env use 3.11
poetry shell
poetry install
Create .env file and update values
cp .env.template .env
See Prerequsites for information on Google Cloud/Gmail setup
Usage
The downloader can be run directly:
python3 src/dbs/main.py
or with Docker compose:
docker-compose build && docker-compose up
Prerequisites
-
Text-forwarding from iPhone/Android to an email account. On iOS, one possible method is to use an automation to forward SMS messages from DBS to an email account.
-
Google Cloud account, with the Gmail API enabled (see Google Cloud docs)
-
Authorized Gmail account (see Gmail API docs)
-
Secret stored on Google Secret Manager, which is defined in the .env file as
SECRET_ID. The secret should be the contents of thetoken.jsonfile generated by running thequickstart.pyscript in this repository. This allows the OTP to be retrieved from Gmail.Note:
quickstart.pyrequires acredentials.jsonfile to generate the Gmail access token, which can be generated with these steps.
Metadata
Release files for dbs-statement-downloader 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dbs_statement_downloader-0.2.1.tar.gz | 11.7 kB | Without provenance | Details for dbs_statement_downloader-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dbs_statement_downloader-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for dbs_statement_downloader-0.2.1-py3-none-any.whl |
Total release size: 24.9 kB
Release files / dbs_statement_downloader-0.2.1.tar.gz
| Download URL | dbs_statement_downloader-0.2.1.tar.gz |
|---|---|
| Size | 11.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
eca974832e2d502c22deebf19290c06e04cf7f8d62c505b3d7106fae1023218f
|
|
BLAKE2b-256 checksum How to use checksums |
5e27607d82c4adcb537a035443e7784c5afc0c8f788bacf49ac73a36f65fa318
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.12.1 Linux/5.15.133.1-microsoft-standard-WSL2
|
Release files / dbs_statement_downloader-0.2.1-py3-none-any.whl
| Download URL | dbs_statement_downloader-0.2.1-py3-none-any.whl |
|---|---|
| Size | 13.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
25d8efed787181240bb1748e298e0c81b51f9d732e06ed946acc3d6cd83f25bb
|
|
BLAKE2b-256 checksum How to use checksums |
ed24615e26c9946e2c07bf44c1acb899335d391b8b21366f4b65cc178c24a469
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.12.1 Linux/5.15.133.1-microsoft-standard-WSL2
|
Security for dbs-statement-downloader 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.