ai-agent

pytube: Download YouTube videos

Get YouTube videos with pytube, a lightweight Python library, ideal.
13,171 stars2,490 forksPythonGuide quality 8/10Updated 8/15/2024100% free · open source
What it does

Pytube is a Python library and CLI for downloading YouTube videos, playlists, and captions in a lightweight and dependency-free manner.

When to use it
  • When you need to download YouTube videos for offline use or analysis
  • When you want to extract captions from YouTube videos for translation or accessibility purposes
  • When you need to automate YouTube video downloads for a project or workflow
Ready-to-paste prompt
Download a YouTube video with `python -m pytube https://www.youtube.com/watch?v=dQw4w9WgXcQ`
Heads up: Be aware that pytube may not work with all YouTube videos due to YouTube's terms of service and video restrictions, and also be mindful of the video's copyright and usage rights before downloading
Saves to your device
Use with Claude
New

Skip the builder — one click puts this in Claude, Cursor, Antigravity and more.

✅ Light setup

Installs with a command or two; your AI agent can do it for you.

Try it instantly — no install
Claude Code
mkdir -p ~/.claude/skills/pytube && curl -fsSL https://workflowstacks.com/api/skills/pytube/claude-skill -o ~/.claude/skills/pytube/SKILL.md
Open in another AI app

Opens the app with this repo with the prompt ready to go — no copy-paste needed.

Connect the whole catalog (MCP)
claude mcp add --transport http workflowstacks https://workflowstacks.com/api/mcp

Adds a WorkflowStacks connector to Claude Code: search and load any skill here by chatting.

How pytube: Download YouTube videos works
Codeflow
Free to inspect

Pytube: Download YouTube videos is a medium Python project (~5.1k lines across 23 code files, plus 17 test files). Setup is light: installs like a normal app. Reading the code is optional. Last commit 25 months ago, Unlicense license, has a test suite.

Size
Medium codebase
~5.1k lines · 23 code files · 42 min skim
Setup
One-command install
Installs like a normal app. Reading the code is optional.
Runs on
Python
No API keys detected
Python 99%Makefile 1%
Where to start reading
  1. 1
    README.md
    Start here — what it does and how to install it
  2. 2
    pytube/cli.py
    Where the program starts running
  3. 3
    pytube/__init__.py
    Inside pytube/ — the main logic begins here
What's in each folder
pytube/Core code — the actual logic21 files
docs/Documentation14 files
tests/Tests — proof it works29 files
.github/CI / automation (GitHub Actions)5 files
images/Images & static assets2 files
READMEHas testsDocumentedCI checksUnlicense licenseLast update 25 mo ago
Quick Actions
Details
Creator
pytube
Language
Python
Category
ai-agent
Published
3/18/2012

Are you the creator of this tool? Claim your listing → and earn 85% of every sale.