finance-dl’s interactive mode drops you into a live IPython shell with a fully initialised scraper instance, a real browser window, and direct access to Selenium helpers — all wired together in one command. This page explains how to launch interactive mode, what variables are available in the shell, and common patterns for debugging login flows and multi-factor authentication.Documentation 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.
Launching Interactive Mode
Add the--interactive (or -i) flag to any finance_dl.cli invocation:
--interactive flag implies --visible — you do not need to pass both.
What’s in the Shell
When the shell opens, the namespace is populated with the module’s own globals plus a set of context-specific variables injected by the scraper module’sinteractive() context manager.
For Selenium-based scrapers
Most scrapers usescrape_lib.interact_with_scraper, which yields:
| Variable | Type | Description |
|---|---|---|
scraper | scrape_lib.Scraper | The active scraper instance (same object as self) |
self | scrape_lib.Scraper | Alias for scraper, matching the scraper’s own method signatures |
By | selenium.webdriver.common.by.By | Locator strategy constants (By.XPATH, By.ID, etc.) |
Select | selenium.webdriver.support.ui.Select | Helper for interacting with <select> elements |
Keys | selenium.webdriver.common.keys.Keys | Keyboard key constants (Keys.RETURN, Keys.TAB, etc.) |
self.driver to call any Selenium API directly.
For OFX-based scrapers
Thefinance_dl.ofx module’s interactive() context yields:
| Variable | Type | Description |
|---|---|---|
ofx_params | dict | The OFX connection parameters from your config |
output_directory | str | The output path from your config |
inst | ofxclient.Institution | An already-connected Institution object ready for queries |
Module-level globals
All functions and variables defined at the top level of the scraper module are also available in the shell namespace, so you can call internal helpers directly.The shell is launched with
%load_ext autoreload and %autoreload 2 already
active. Any changes you make to the scraper source file on disk are reloaded
automatically before the next statement executes — no need to restart the
shell to pick up edits.Common Interactive Patterns
Run the full scraper
For most scrapers, callingself.run() executes the complete scraping sequence from inside the shell:
Navigate the browser manually
Find page elements
Interact with elements
Handle MFA manually
If a scraper stops at an MFA prompt, complete the challenge directly in the visible browser window and then continue the scraping session from the shell:Reload Edited Code Without Restarting
Because%autoreload 2 is active, you can edit a scraper module in your editor and call it again in the same shell session without losing your browser state: