Discover Card transactions can be downloaded using two different approaches in finance-dl. The first uses theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/jbms/finance-dl/llms.txt
Use this file to discover all available pages before exploring further.
finance_dl.ofx module to connect directly via the OFX protocol — no browser needed. The second uses the finance_dl.discover Selenium scraper, which logs into the Discover website and downloads an OFX file through the web interface. This page covers both approaches, their configuration parameters, output format, and how to invoke the web scraper from the interactive shell.
Approach 1: OFX Direct Connect (Recommended)
When the OFX connection is working, this approach is simpler and more reliable. It usesfinance_dl.ofx with Discover-specific ofx_params. Discover enforces a minimum 5-second delay between OFX requests; the module detects this automatically and inserts the required wait — no extra configuration is needed.
For full details on OFX configuration parameters (including acct_dir_map, overlap_days, and min_start_date), see the OFX scraper documentation.
OFX Config Example
Approach 2: Web Scraper (finance_dl.discover)
If the OFX connection is unavailable or unreliable, the finance_dl.discover module uses selenium and chromedriver to log into the Discover web portal and download an OFX file directly.
Configuration Parameters
A dictionary containing your Discover login credentials.
Path on the local filesystem where the OFX output file will be written. The directory will be created automatically if it does not already exist.
Path to a persistent Chrome browser profile directory. This must be a path used exclusively for this scraper configuration — do not point it at your regular browser profile. When omitted, a fresh temporary profile is created on every run.
It is highly recommended to set
profile_dir. Without it, Discover’s multi-factor authentication prompt will appear on every run, requiring manual intervention each time.When
True, Chrome runs without a visible window. Set to False to show the browser — useful for debugging login or MFA issues.Output Format
The scraper downloads a single OFX file covering all transactions in the current calendar year. The file is written to a sub-directory ofoutput_directory named after the last four digits of your card number, using the naming scheme <output_directory>/<last4>/Discover-<year>.ofx. For example: discover/1234/Discover-2024.ofx.