Skip to main content

A tool to download PDFs from the DOJ Epstein files

Project description

Epstein Files Downloader

Python 3.9+ License: MIT

A tool to download PDF documents from the DOJ Epstein files.

๐Ÿš€ Quick Start: Try it live or deploy your own โ€” No server required, 100% client-side, completely free!

Features

Feature CLI Tool Web Interface
๐Ÿ” Automatic authentication โœ… โœ… (via browser)
๐Ÿ“„ Smart URL handling โœ… โœ…
๐Ÿ”„ Auto-retry on auth expiry โœ… N/A
๐Ÿ“ Preserves original extensions โœ… โœ…
๐Ÿš€ Easy to use CLI commands One-click deploy
๐Ÿ Python API โœ… N/A
๐ŸŒ Browser-based โŒ โœ…
๐Ÿ’ฐ Hosting cost Free Free (Vercel)
๐Ÿ”’ Privacy Local only 100% client-side

Choose Your Path

Installation (CLI)

Requirements

  • Python 3.9 or higher
  • Playwright (installed automatically)

Install from PyPI

pip install epstein-files-downloader

Install from source

git clone https://github.com/hackingbutlegal/epstein-files-downloader.git
cd epstein-files-downloader
pip install -e .

Or install dependencies first with requirements.txt:

git clone https://github.com/hackingbutlegal/epstein-files-downloader.git
cd epstein-files-downloader
pip install -r requirements.txt
pip install -e .

Install Playwright browsers

playwright install chromium

CLI Usage

Quick Start

  1. Create a file with URLs (urls.txt):

    https://www.justice.gov/epstein/file/123456/dl
    https://www.justice.gov/epstein/file/123457/dl
    ...
    
  2. Authenticate (one-time setup):

    epstein-auth
    

    A browser window will open. Click "Yes" on the age verification page, then press Enter in the terminal.

  3. Download files:

    epstein-download -i urls.txt
    

CLI Reference

epstein-auth - Authentication

epstein-auth [OPTIONS]

Options:
  --auth-file PATH    Custom path for auth state file

epstein-download - Download files

epstein-download -i INPUT [OPTIONS]

Options:
  -i, --input PATH      Input file containing URLs (required)
  -o, --output PATH     Output directory (default: downloads)
  --auth-file PATH      Path to authentication state file
  --timeout INTEGER     Download timeout in ms (default: 60000)
  --no-retry            Don't retry with re-auth on failure
  -q, --quiet           Suppress progress output
  --version             Show version
  -h, --help            Show help message

CLI Examples

# Download to custom directory
epstein-download -i urls.txt -o ./my-documents

# Use custom auth file location
epstein-auth --auth-file ~/.epstein-auth.json
epstein-download -i urls.txt --auth-file ~/.epstein-auth.json

# Quiet mode (no progress output)
epstein-download -i urls.txt -q

Python API

You can also use this as a library in your Python scripts:

from epstein_downloader import Downloader, AuthManager

# Authenticate
auth = AuthManager()
auth.authenticate()

# Download files
downloader = Downloader(download_dir="./downloads")
urls = downloader.extract_urls_from_file("urls.txt")
downloaded = downloader.download(urls)

print(f"Downloaded {len(downloaded)} files")

Web Interface

The fastest way to get started! A fully client-side web interface - no server required.

๐ŸŒ Live Site: https://epstein-files-downloader.vercel.app

Deploy with Vercel

Quick Start (Web)

  1. Click the "Deploy to Vercel" button above โ˜๏ธ
  2. Visit your deployed site
  3. Click "Open DOJ Website" and complete age verification
  4. Paste your URLs and download!

Features

  • ๐ŸŒ 100% Client-side - No data sent to any server
  • ๐Ÿ”’ Privacy-focused - Your URLs and cookies stay in your browser
  • ๐Ÿ“‹ 3-Step Wizard - Guided age verification โ†’ paste URLs โ†’ download
  • ๐Ÿ“‚ Batch Download - Download all files with one click
  • ๐Ÿ”„ Retry Blocked - One-click retry if popup blocker interferes
  • ๐Ÿ“ฑ Mobile friendly - Works on all devices
  • ๐Ÿšซ No proxy - Your browser connects directly to DOJ
  • ๐Ÿ’ฐ Free forever - Zero hosting costs on Vercel's free tier

How It Works

The web interface works entirely in your browser:

  1. URL Processing: JavaScript extracts URLs from your pasted text
  2. Direct Downloads: Files open in new tabs using your browser's existing cookies
  3. No Server: Nothing is sent to any server - everything happens locally

Why No Server?

The web interface uses a novel approach to avoid server-side proxying:

  • Your browser already has the authentication cookie from visiting justice.gov
  • We open PDF URLs in new tabs (window.open())
  • The browser sends cookies automatically with these requests
  • Downloads happen directly between your browser and DOJ servers

Benefits:

  • Zero server costs
  • Perfect privacy - we never see your URLs
  • No CORS issues (navigation vs. XHR)
  • Works with your existing browser session
  • Instant deployment - just static files

Manual Deployment

Don't want to use the button? Deploy manually:

# Install Vercel CLI
npm i -g vercel

# Clone and deploy
git clone https://github.com/hackingbutlegal/epstein-files-downloader.git
cd epstein-files-downloader
vercel

Local Web Development

cd web
npm install
npm start

The web app will be available at http://localhost:3000.

Using the Web Interface

  1. Step 1: Age Verification

    • Click "๐ŸŒ Open DOJ Website" - a new tab opens
    • Click "Yes" on the DOJ age verification page
    • Return to the app and click "โœ… I've Clicked 'Yes'"
  2. Step 2: Paste URLs

    • Paste text containing DOJ file URLs
    • Click "๐Ÿ” Find Files" to extract URLs
  3. Step 3: Download

    • Click "โฌ‡๏ธ Download All" or individual "Download" buttons
    • Files open in new tabs and download automatically
    • If blocked by popup blocker, allow popups and click "๐Ÿ”„ Retry Blocked"

How It Works

CLI Tool

  1. Authentication: The tool uses Playwright to open a real browser for age verification. Once you click "Yes", the authenticated session (cookies) is saved to a file.

  2. URL Processing: The DOJ website serves files at /file/{id}/dl URLs. The tool automatically converts these to the PDF endpoint and preserves the original file extension.

  3. Downloading: Files are downloaded using the authenticated session. If authentication expires during a long download session, the tool automatically re-authenticates and continues.

Web Interface

  1. Client-side processing: JavaScript extracts URLs from your pasted text using regex
  2. Browser authentication: Uses your existing browser cookies from visiting justice.gov
  3. Direct downloads: Opens PDF URLs in new tabs, letting the browser handle authentication and download natively

Troubleshooting

CLI: "No auth file found"

Run epstein-auth first to authenticate.

CLI: "HTTP 403" errors

Your session may have expired. The tool should auto-retry, but you can also run epstein-auth again to refresh.

CLI: Playwright not found

Install Playwright browsers:

playwright install chromium

Web: Downloads not working

  1. Make sure you visited DOJ first: Open https://www.justice.gov/epstein and click "Yes" on age verification
  2. Same browser: Use the same browser for both the DOJ site and the web app
  3. Allow popups: The web app needs to open new tabs for downloads
  4. Check cookies: Some browsers block third-party cookies which may affect this

Web: Popups blocked

If you see "Popup blocked" errors:

  • Look for the popup blocker icon in your address bar
  • Click it and allow popups for the site
  • Or change your browser settings to allow popups

Development

# Clone the repo
git clone https://github.com/hackingbutlegal/epstein-files-downloader.git
cd epstein-files-downloader

# Create virtual environment
python -m venv venv
source venv/bin/activate  # Windows: venv\Scripts\activate

# Install in development mode
pip install -e ".[dev]"

# Run tests
pytest

# Run linting
ruff check .
mypy src/

License

MIT License - see LICENSE file.

Disclaimer

This tool is for educational and research purposes. Please respect the DOJ website's terms of service and rate limits. The authors are not responsible for any misuse of this tool.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

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

epstein_files_downloader-1.0.2.tar.gz (168.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

epstein_files_downloader-1.0.2-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

Details for the file epstein_files_downloader-1.0.2.tar.gz.

File metadata

  • Download URL: epstein_files_downloader-1.0.2.tar.gz
  • Upload date:
  • Size: 168.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for epstein_files_downloader-1.0.2.tar.gz
Algorithm Hash digest
SHA256 e8df2a2e41484613648173ce654f2df17e0b8fd6bf6518e0f139d1a12a3e6f56
MD5 b42168b37c2256ede3f20f5795a956e4
BLAKE2b-256 8c00d9c5d5bdcfe5c001905b6dfaf2da631fe850ab700aae6a4761215b0e8e78

See more details on using hashes here.

File details

Details for the file epstein_files_downloader-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for epstein_files_downloader-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f8163ec5654c29f9e48b28dad5f95357773de165f2519edbbb55d398cad96709
MD5 d8d3a8a31a2f0a8bda7eedcae6514950
BLAKE2b-256 f4a82a2b6cafd8dbce578ade3b6e8d37a3b77d38ae71040b49ea8dd0cbc3332f

See more details on using hashes here.

Supported by

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