Youtube Downloader
  • Go 82%
  • Makefile 18%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-09-23 20:14:10 -03:00
CLAUDE.md initial commit 2026-09-23 20:14:10 -03:00
go.mod initial commit 2026-09-23 20:14:10 -03:00
main.go initial commit 2026-09-23 20:14:10 -03:00
Makefile initial commit 2026-09-23 20:14:10 -03:00
README.md initial commit 2026-09-23 20:14:10 -03:00

ydown - YouTube Video Downloader

A CLI tool to download YouTube videos from a CSV file containing video URLs and titles.

Usage

./ydown <input-file> [cookie-file]
  • input-file: CSV file with format link,title (one video per line)
  • cookie-file: (optional) path to cookies.txt file for authentication

Requirements

  • Go (for building)
  • Node.js (required for YouTube's bot challenge solving)
  • Python3 with secretstorage (for browser cookie extraction)

Install Node.js:

sudo apt install nodejs  # Ubuntu/Debian

Install Python dependencies:

python3 -m pip install secretstorage

Authentication

YouTube may require authentication to download videos. There are two methods:

Method 1: Browser Cookies (Default)

The tool automatically attempts to use cookies from Chrome. Requires:

  • Chrome installed and logged into YouTube
  • Python dependencies installed:
python3 -m pip install secretstorage

If browser cookies fail, export cookies manually:

  1. Install the browser extension: "Get cookies.txt LOCALLY" (Chrome/Firefox)
  2. Go to YouTube while logged in
  3. Click the extension and export cookies to a file (e.g., cookies.txt)
  4. Run with the cookie file:
./ydown "your-file.csv" cookies.txt

Example

# Without cookie file (uses browser cookies)
./ydown "videos.csv"

# With cookie file
./ydown "videos.csv" cookies.txt

CSV Format

Create a CSV file with the following format:

https://www.youtube.com/watch?v=VIDEO_ID,Video Title
https://www.youtube.com/watch?v=VIDEO_ID2,Another Video Title

Videos will be downloaded to a directory named after the CSV file (without extension).

Building

go build -o ydown main.go