Pytube is a Python library and command line interface for downloading videos, playlists, and captions from YouTube. It functions as both a programmatic tool for metadata extraction and a standalone media downloader.
The project is designed using only the Python standard library to avoid external package dependencies. It utilizes regular expression-based HTML parsing to extract stream URLs and asset details directly from the platform.
The library supports retrieving video metadata and thumbnails, as well as extracting caption tracks. It provides capabilities for downloading entire playlists and reconstructing DASH streams when progressive downloads are unavailable.