Export your YouTube subscriptions from a saved HTML page to a CSV file that matches Google Takeout format.
This tool helps you backup your YouTube subscriptions by:
- Parsing a saved HTML page of your YouTube subscriptions
- Extracting channel information using yt-dlp
- Exporting to a CSV file compatible with Google Takeout
- Python 3.12 or higher
- yt-dlp installed and accessible in your PATH
- SingleFile browser extension
# Clone the repository
git clone https://github.com/yourusername/save-subscriptions.git
cd save-subscriptions
# Install using uv
uv sync
- Install the SingleFile browser extension
- Navigate to your YouTube subscriptions page
- Click the dropdown arrow to sort channels A-Z
- Scroll to the bottom to load all channels
- Click the SingleFile extension icon to save the page
- Save the HTML file to the
data/
folder in this project
# Basic usage - processes all HTML files in data/ folder
uv run save-subscriptions
# With browser cookies (recommended for age-restricted content)
uv run save-subscriptions --browser chrome
uv run save-subscriptions --browser firefox
# Specify input file
uv run save-subscriptions data/subscriptions.html
# Specify output location
uv run save-subscriptions data/subscriptions.html -o my-subscriptions.csv
# Use a cookies file
uv run save-subscriptions --cookies-file cookies.txt
# Show help
uv run save-subscriptions --help
If you encounter errors about age-restricted content or authentication, use the --browser
option to extract cookies from your browser:
# Extract cookies from Chrome
uv run save-subscriptions --browser chrome
# Extract cookies from Firefox
uv run save-subscriptions --browser firefox
Supported browsers: chrome, firefox, edge, safari, brave, chromium, opera, vivaldi
Note: Make sure you're logged into YouTube in the browser you specify.
The tool generates a CSV file matching Google Takeout format:
Channel ID,Channel URL,Channel title
UC--x42Wg-c4nRydL4mJJdaA,http://www.youtube.com/channel/UC--x42Wg-c4nRydL4mJJdaA,VineArmy
# Install dependencies
uv sync
# Install pre-commit hooks
uv run pre-commit install
# Run tests
uv run coverage
# Run linting
uv run ruff check .
uv run ruff format .
- yt-dlp not found: Ensure yt-dlp is installed and in your PATH
- No channels found: Check that the HTML file contains your full subscriptions page
- Network errors: The tool needs internet access to fetch channel metadata
- Age-restricted content: Use
--browser
option to extract cookies from your browser - 404 errors: Some channels may have been deleted or made private
MIT License - see LICENSE file for details