Skip to main content

Automatic download of banking/broker documents from flatex

Project description

statement-dl

PyPI calver

This tool is built to be able to automatically download all documents from online banks and brokes that don't offer batch download options themselves, since it is usually quite cumbersome to download each file individually. The automatic download is especially useful when used in conjunction with portfolio tracking tools like portfolio performance that are able to subsequently import the downloaded PDFs. The downloaded files are sorted into separate subdirectories based on the document type.

Currently, only flatex is supported. PRs are welcome!

Installation

This Python tool currently uses Firefox and geckodriver to find and download your files. You can download Firefox from the mozilla homepage: https://www.mozilla.org/de/.

You can download geckodriver from Github: https://github.com/mozilla/geckodriver/releases.

Then, download statement-dl using pip: pip install -U statement-dl or simply clone the repository and install from source using pip install -U <repository-path>. If you don't want to install the tool and its dependencies into your global python environment, I recommended using pipx instead of pip directly.

Usage

To start off, you probably want to download all your previous documents. By default, the tool only downloads the unread files. To download all files from flatex, use the command

>>> statement_dl flatex <destination dir> --all-files

If you don't specify the --username and --password options, you will be prompted to enter them yourself in the browser.

To see all options, type

>>> statement_dl --help

To get all options for a specific broker/bank, type e.g.

>>> statement_dl flatex --help
usage: statement_dl flatex [-h] [-f DATE] [-t DATE] [-g PATH] [-u USERNAME]
                           [-p PASSWORD] [--wsl] [--headless] [-a] [-k] [--de]
                           dest

positional arguments:
  dest                  Directory in which your downloaded files will be saved

optional arguments:
  -h, --help            show this help message and exit
  -f DATE, --from-date DATE
                        Date from which you want to download your files (in
                        the format YYYY-MM-DD or 'today'). Defaults to
                        '2010-01-01'
  -t DATE, --to-date DATE
                        Date until which you want to download your files (in
                        the format YYYY-MM-DD or 'today'). Defaults to 'today'
  -g PATH, --geckodriver PATH
                        Path to geckodriver executable. If not specified, it
                        will look for it in the Path
  -u USERNAME, --username USERNAME
                        Username for automatic login
  -p PASSWORD, --password PASSWORD
                        Password for automatic login
  --wsl                 Set this option when running the script in WSL while
                        using a geckodriver executable that was installed on
                        Windows
  --headless            Launch browser in headless mode. This only works if
                        username and password are set
  -a, --all-files       Automatically download all files instead of only
                        unread
  -k, --keep-filenames  Keep the original filenames instead of renaming them
                        to a more useful format
  --de                  Use 'de' domain instead of 'at' (experimental)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

statement-dl-2023.7.1.tar.gz (9.9 kB view details)

Uploaded Source

Built Distribution

statement_dl-2023.7.1-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

Details for the file statement-dl-2023.7.1.tar.gz.

File metadata

  • Download URL: statement-dl-2023.7.1.tar.gz
  • Upload date:
  • Size: 9.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for statement-dl-2023.7.1.tar.gz
Algorithm Hash digest
SHA256 a76aea05943057eaedb17d6dd0bbb0ac9568658cd6c89fa07f8500c3a3bdb215
MD5 2eade741d5469d57b504b07aa8ade567
BLAKE2b-256 87656e4142c794343c1846ac6f7d93f449f9d5726d2a43ddee52253a3f27b4b6

See more details on using hashes here.

File details

Details for the file statement_dl-2023.7.1-py3-none-any.whl.

File metadata

File hashes

Hashes for statement_dl-2023.7.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0a19298c35de7d4581d9b54c204eecb4e55195520617f77b625e2dfc5132ceff
MD5 975d01d9779cfa5e50fec041a8cb27ae
BLAKE2b-256 414bb69a32192df9d244f6ad7d0e77d752ef24639b6cf3aa4dca678fb9c66a3a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page