{ "info": { "author": "Nick Ficano", "author_email": "nficano@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: MacOS", "Operating System :: Microsoft", "Operating System :: POSIX", "Operating System :: Unix", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Internet", "Topic :: Multimedia :: Video", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Terminals", "Topic :: Utilities" ], "description": "\n\n
\n\n# pytube\n*pytube* is a very serious, lightweight, dependency-free Python library (and command-line utility) for downloading YouTube Videos.\n\n## Description\nYouTube is the most popular video-sharing platform in the world and as a hacker you may encounter a situation where you want to script something to download videos. For this I present to you *pytube*.\n\n*pytube* is a lightweight library written in Python. It has no third party dependencies and aims to be highly reliable.\n\n*pytube* also makes pipelining easy, allowing you to specify callback functions for different download events, such as ``on progress`` or ``on complete``.\n\nFinally *pytube* also includes a command-line utility, allowing you to quickly download videos right from terminal.\n\n### Behold, a perfect balance of simplicity versus flexibility:\n\n```python\n >>> YouTube('https://youtu.be/9bZkp7q19f0').streams.first().download()\n >>> yt = YouTube('http://youtube.com/watch?v=9bZkp7q19f0')\n >>> yt.streams\n ... .filter(progressive=True, file_extension='mp4')\n ... .order_by('resolution')\n ... .desc()\n ... .first()\n ... .download()\n```\n\n## Features\n- Support for Both Progressive & DASH Streams\n- Support for downloading complete playlist\n- Easily Register ``on_download_progress`` & ``on_download_complete`` callbacks\n- Command-line Interfaced Included\n- Caption Track Support\n- Outputs Caption Tracks to .srt format (SubRip Subtitle)\n- Ability to Capture Thumbnail URL.\n- Extensively Documented Source Code\n- No Third-Party Dependencies\n\n## Installation\n\nDownload using pip via pypi.\n\n```bash\n$ pip install pytube\n```\n\n## Getting started\n\nLet's begin with showing how easy it is to download a video with pytube:\n\n```python\n>>> from pytube import YouTube\n>>> YouTube('http://youtube.com/watch?v=9bZkp7q19f0').streams.first().download()\n```\nThis example will download the highest quality progressive download stream available.\n\nNext, let's explore how we would view what video streams are available:\n\n```python\n>>> yt = YouTube('http://youtube.com/watch?v=9bZkp7q19f0')\n>>> yt.streams.all()\n [