Release v15.0.0. (Installation)
pytube is a lightweight, Pythonic, dependency-free, library (and command-line utility) for downloading YouTube Videos.
Behold, a perfect balance of simplicity versus flexibility:
>>> from pytube import YouTube >>> YouTube('https://youtu.be/9bZkp7q19f0').streams.first().download() >>> yt = YouTube('http://youtube.com/watch?v=9bZkp7q19f0') >>> yt.streams ... .filter(progressive=True, file_extension='mp4') ... .order_by('resolution') ... .desc() ... .first() ... .download()
- Support for Both Progressive & DASH Streams
- Easily Register
- Command-line Interfaced Included
- Caption Track Support
- Outputs Caption Tracks to .srt format (SubRip Subtitle)
- Ability to Capture Thumbnail URL.
- Extensively Documented Source Code
- No Third-Party Dependencies
The User Guide¶
This part of the documentation begins with some background information about the project, then focuses on step-by-step instructions for getting the most out of pytube.
- Installation of pytube
- Working with Streams and StreamQuery
- Filtering Streams
- Downloading Streams
- Subtitle/Caption Tracks
- Using Playlists
- Using Channels
- Using the search feature
- Additional functionality
- Command-line interface (CLI)
- Exception handling
The API Documentation¶
If you are looking for information on a specific function, class, or method, this part of the documentation is for you.