A comprehensive, secure Python solution for automating the download of large Google Takeout exports across multiple files.
- Batch download of multiple Takeout files
- Secure credential management
- Automatic authentication token refresh
- Detailed logging and error handling
- Two-factor authentication support
- Resumable downloads
- Python 3.8+
- Chrome or Chromium browser
- Selenium WebDriver
- Active Google Takeout export
sudo apt update
sudo apt install -y \
python3-venv \
python3-pip \
chromium-chromedriver \
chromium-browser \
python3-seleniumgit clone https://github.com/cschladetsch/google-takeout-downloader.git
cd google-takeout-downloader# Create and activate virtual environment
python3 -m venv venv
source venv/bin/activate
# Upgrade pip
pip install --upgrade pip
# Install dependencies
pip install -r requirements.txt# Run configuration wizard
python configure_secrets.pyThe configuration wizard will:
- Validate existing configuration
- Securely prompt for missing information
- Store credentials using system keyring
- Support optional two-factor authentication
- Google account email
- Secure password storage
- Two-factor authentication secret (optional)
- Download output directory
- Download delay between files
- Logging preferences
# Activate virtual environment
source venv/bin/activate
# Download files from index 1 to 10
./download_takeout.py -s 1 -e 10# Resume from last downloaded file
./download_takeout.py --continue# Specify a different download location
./download_takeout.py -s 1 -e 10 -d /path/to/output| Option | Description | Default |
|---|---|---|
-s, --start |
Starting file index | Required |
-e, --end |
Ending file index | Required |
-d, --directory |
Output directory | /mnt/f/GoogleTakeout |
--delay |
Seconds between downloads | 5 |
--continue |
Resume from last file | False |
-h, --help |
Show help message | - |
# Manually refresh download token
python token_retriever.py- Logs saved to
takeout_download.log - Configurable log levels in
secrets.json
- Verify Google account credentials
- Check network connectivity
- Ensure sufficient disk space
- Update Chrome/Chromium WebDriver
- Two-factor authentication support
- Automatic token refresh
- Detailed error logging
- Credentials stored securely
- No direct storage of plain-text passwords
- Support for system keyring
- Configurable logging
# Activate virtual environment
source venv/bin/activate
# Run tests
pytest- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
Distributed under the MIT License. See LICENSE for details.
This tool is not affiliated with Google. Use responsibly and respect Google's terms of service.