Skip to main content

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.

The finance_dl.anthem scraper downloads Anthem BlueCross Explanation of Benefits (EOB) statements as PDF files, along with structured JSON claim data, using selenium and chromedriver. Because Anthem actively detects and blocks automated login attempts, this scraper is semi-automatic: you log in and navigate to the claims page yourself in the visible browser window, then the scraper takes over to download all available claims.
headless must be set to False. Anthem’s automation countermeasures require a visible browser window for the manual login step. Setting headless: True will cause the scraper to fail.

Configuration Parameters

login_url
string
required
The initial URL to open in the browser. The user is responsible for manually logging in and navigating to the claims page from this starting point. Use 'https://anthem.com' as the standard value.
output_directory
string
required
Path on the local filesystem where output files will be written. The directory is created automatically if it does not already exist.
profile_dir
string
Path to a persistent Chrome browser profile directory used exclusively for this scraper. Do not point this at your regular browser profile. When omitted, a fresh temporary profile is used on every run.
A persistent profile_dir is recommended so that your Anthem session can be reused across runs, reducing how often you need to complete the manual login flow.
headless
bool
default:"False"
Must be set to False. The manual login step requires a visible browser window. This parameter is listed explicitly in the config to make the requirement clear.

Manual Login Flow

Because Anthem blocks automated logins, you must complete the sign-in process yourself each time. Once you have navigated to the claims page, the scraper takes over automatically.
1

Launch the scraper

Run finance-dl with your Anthem configuration. A visible Chrome window will open and navigate to login_url.
2

Log in to your Anthem account

In the browser window, enter your Anthem username and password and complete any multi-factor authentication challenge.
3

Navigate to the claims page

After logging in, manually browse to the claims listing page within the Anthem website.
4

Let the scraper take over

Once the claims page is loaded, the scraper detects the claim data and automatically downloads all available EOB PDFs and JSON files to output_directory.

Output Format

Two files are written to output_directory for each claim:
FileDescription
<id>.jsonJSON representation of the claim as returned by the Anthem server.
<id>.pdfThe Explanation of Benefits (EOB) PDF statement for the claim.
The JSON file has the following structure:
{
  "patient": {
    "displayName": "John Smith",
    "uniqueId": "123456789",
    "allowsAccess": true
  },
  "provider": "SOME MEDICAL PROVIDER",
  "totalCharges": 385,
  "serviceDate": "01/02/2017 00:00:00",
  "memberResponsibility": 111.05,
  "status": "Approved",
  "appliedToDeductible": 111.05,
  "claimNumber": "2017123AB1234"
}

Config Example

def CONFIG_anthem():
    return dict(
        module='finance_dl.anthem',
        login_url='https://anthem.com',
        output_directory=os.path.join(data_dir, 'anthem'),
        profile_dir=os.path.join(profile_dir, 'anthem'),
        headless=False,
    )

Interactive Shell

From the finance-dl interactive shell, start the scraper with:
self.run()

Build docs developers (and LLMs) love