pytube2


Namepytube2 JSON
Version 15.0.6 PyPI version JSON
download
home_pagehttps://github.com/Josh-XT/pytube2
SummaryPython 3 library for downloading YouTube Videos.
upload_time2024-03-23 21:57:58
maintainerNone
docs_urlNone
authorRonnie Ghose, Taylor Fox Dahlin, Nick Ficano
requires_python>=3.7
licenseThe Unlicense (Unlicense)
keywords youtube download video stream
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
<div align="center">
  <p>
    <a href="#"><img src="https://assets.nickficano.com/gh-pytube.min.svg" width="456" height="143" alt="pytube logo" /></a>
  </p>
  <p align="center">
	<a href="https://pypi.org/project/pytube/"><img src="https://img.shields.io/pypi/dm/pytube?style=flat-square" alt="pypi"/></a>
	<a href="https://pytube.io/en/latest/"><img src="https://readthedocs.org/projects/python-pytube/badge/?version=latest&style=flat-square" /></a>
	<a href="https://pypi.org/project/pytube/"><img src="https://img.shields.io/pypi/v/pytube?style=flat-square" /></a>
  </p>
</div>

### Actively soliciting contributors!

Have ideas for how pytube can be improved? Feel free to open an issue or a pull request!

# pytube

*pytube* is a genuine, lightweight, dependency-free Python library (and command-line utility) for downloading YouTube videos.

## Documentation

Detailed documentation about the usage of the library can be found at [pytube.io](https://pytube.io). This is recommended for most cases. If you want to hastily download a single video, the [quick start](#Quickstart) guide below might be what you're looking for.

## Description

YouTube 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*.

*pytube* is a lightweight library written in Python. It has no third-party
dependencies and aims to be highly reliable.

*pytube* also makes pipelining easy, allowing you to specify callback functions for different download events, such as  ``on progress`` or ``on complete``.

Furthermore, *pytube* includes a command-line utility, allowing you to download videos right from the terminal.

## Features

- Support for both progressive & DASH streams
- Support for downloading the complete playlist
- Easily register ``on_download_progress`` & ``on_download_complete`` callbacks
- 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

## Quickstart

This guide covers the most basic usage of the library. For more detailed information, please refer to [pytube.io](https://pytube.io).

### Installation

Pytube requires an installation of Python 3.6 or greater, as well as pip. (Pip is typically bundled with Python [installations](https://python.org/downloads).)

To install from PyPI with pip:

```bash
pip uninstall pytube -y
pip install pytube2
```

### Using pytube in a Python script

To download a video using the library in a script, you'll need to import the YouTube class from the library and pass an argument of the video URL. From there, you can access the streams and download them.

```python
from pytube.download_helper import (
    download_videos_from_channels,
    download_video,
    download_videos_from_list,
)

# download_videos_from_channels(channels=["channel1", "channel2"])
# download_videos_from_list(filename="videos.txt")
# download_video(url="https://www.youtube.com/watch?v=VIDEO_ID")
```

### Using the command-line interface

Using the CLI is remarkably straightforward as well. To download a video at the highest progressive quality, you can use the following command:

```bash
pytube https://youtube.com/watch?v=2lAe1cqCOXo
```

You can also do the same for a playlist:

```bash
pytube https://www.youtube.com/playlist?list=PLS1QulWo1RIaJECMeUT4LFwJ-ghgoSH6n
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Josh-XT/pytube2",
    "name": "pytube2",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "youtube, download, video, stream",
    "author": "Ronnie\u00a0Ghose, Taylor Fox Dahlin, Nick Ficano",
    "author_email": "hey@pytube.io",
    "download_url": "https://files.pythonhosted.org/packages/c0/27/8771c643131d25e30f6b9a54b0409f29cb0a8f43efc121c54fe7d1a94c7b/pytube2-15.0.6.tar.gz",
    "platform": null,
    "description": "\n<div align=\"center\">\n  <p>\n    <a href=\"#\"><img src=\"https://assets.nickficano.com/gh-pytube.min.svg\" width=\"456\" height=\"143\" alt=\"pytube logo\" /></a>\n  </p>\n  <p align=\"center\">\n\t<a href=\"https://pypi.org/project/pytube/\"><img src=\"https://img.shields.io/pypi/dm/pytube?style=flat-square\" alt=\"pypi\"/></a>\n\t<a href=\"https://pytube.io/en/latest/\"><img src=\"https://readthedocs.org/projects/python-pytube/badge/?version=latest&style=flat-square\" /></a>\n\t<a href=\"https://pypi.org/project/pytube/\"><img src=\"https://img.shields.io/pypi/v/pytube?style=flat-square\" /></a>\n  </p>\n</div>\n\n### Actively soliciting contributors!\n\nHave ideas for how pytube can be improved? Feel free to open an issue or a pull request!\n\n# pytube\n\n*pytube* is a genuine, lightweight, dependency-free Python library (and command-line utility) for downloading YouTube videos.\n\n## Documentation\n\nDetailed documentation about the usage of the library can be found at [pytube.io](https://pytube.io). This is recommended for most cases. If you want to hastily download a single video, the [quick start](#Quickstart) guide below might be what you're looking for.\n\n## Description\n\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\ndependencies 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\nFurthermore, *pytube* includes a command-line utility, allowing you to download videos right from the terminal.\n\n## Features\n\n- Support for both progressive & DASH streams\n- Support for downloading the 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## Quickstart\n\nThis guide covers the most basic usage of the library. For more detailed information, please refer to [pytube.io](https://pytube.io).\n\n### Installation\n\nPytube requires an installation of Python 3.6 or greater, as well as pip. (Pip is typically bundled with Python [installations](https://python.org/downloads).)\n\nTo install from PyPI with pip:\n\n```bash\npip uninstall pytube -y\npip install pytube2\n```\n\n### Using pytube in a Python script\n\nTo download a video using the library in a script, you'll need to import the YouTube class from the library and pass an argument of the video URL. From there, you can access the streams and download them.\n\n```python\nfrom pytube.download_helper import (\n    download_videos_from_channels,\n    download_video,\n    download_videos_from_list,\n)\n\n# download_videos_from_channels(channels=[\"channel1\", \"channel2\"])\n# download_videos_from_list(filename=\"videos.txt\")\n# download_video(url=\"https://www.youtube.com/watch?v=VIDEO_ID\")\n```\n\n### Using the command-line interface\n\nUsing the CLI is remarkably straightforward as well. To download a video at the highest progressive quality, you can use the following command:\n\n```bash\npytube https://youtube.com/watch?v=2lAe1cqCOXo\n```\n\nYou can also do the same for a playlist:\n\n```bash\npytube https://www.youtube.com/playlist?list=PLS1QulWo1RIaJECMeUT4LFwJ-ghgoSH6n\n```\n",
    "bugtrack_url": null,
    "license": "The Unlicense (Unlicense)",
    "summary": "Python 3 library for downloading YouTube Videos.",
    "version": "15.0.6",
    "project_urls": {
        "Bug Reports": "https://github.com/Josh-XT/pytube/issues",
        "Homepage": "https://github.com/Josh-XT/pytube2",
        "Read the Docs": "https://pytube.io"
    },
    "split_keywords": [
        "youtube",
        " download",
        " video",
        " stream"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ed657684495f3332bd89eb7185b5dba3aecfb44e9bb5c80fbfc1932128442a1e",
                "md5": "1ad8e7208b64fa4841a02af615998462",
                "sha256": "668cdf2b781ec4552f694255201f4e700b7e2520c86a4562f7a39ffa7547d130"
            },
            "downloads": -1,
            "filename": "pytube2-15.0.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1ad8e7208b64fa4841a02af615998462",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 59032,
            "upload_time": "2024-03-23T21:57:56",
            "upload_time_iso_8601": "2024-03-23T21:57:56.443831Z",
            "url": "https://files.pythonhosted.org/packages/ed/65/7684495f3332bd89eb7185b5dba3aecfb44e9bb5c80fbfc1932128442a1e/pytube2-15.0.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c0278771c643131d25e30f6b9a54b0409f29cb0a8f43efc121c54fe7d1a94c7b",
                "md5": "8c14b9abae426cb52afebc44d493f7b0",
                "sha256": "b641689703183c76dee19511c1911767d8a34c9b1738e2c6ecfcff882183bbcc"
            },
            "downloads": -1,
            "filename": "pytube2-15.0.6.tar.gz",
            "has_sig": false,
            "md5_digest": "8c14b9abae426cb52afebc44d493f7b0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 69763,
            "upload_time": "2024-03-23T21:57:58",
            "upload_time_iso_8601": "2024-03-23T21:57:58.141169Z",
            "url": "https://files.pythonhosted.org/packages/c0/27/8771c643131d25e30f6b9a54b0409f29cb0a8f43efc121c54fe7d1a94c7b/pytube2-15.0.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-23 21:57:58",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Josh-XT",
    "github_project": "pytube2",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pytube2"
}
        
Elapsed time: 0.31547s