{"id":13400371,"url":"https://github.com/pytube/pytube","last_synced_at":"2025-05-13T17:04:14.299Z","repository":{"id":2759463,"uuid":"3757435","full_name":"pytube/pytube","owner":"pytube","description":"A lightweight, dependency-free Python library (and command-line utility) for downloading YouTube Videos.","archived":false,"fork":false,"pushed_at":"2024-08-15T06:51:20.000Z","size":19412,"stargazers_count":12734,"open_issues_count":763,"forks_count":2537,"subscribers_count":198,"default_branch":"master","last_synced_at":"2025-05-06T16:15:37.777Z","etag":null,"topics":["api-wrapper","python","pythonic","youtube"],"latest_commit_sha":null,"homepage":"https://pytube.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pytube.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"Contributing.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2012-03-18T19:33:44.000Z","updated_at":"2025-05-06T07:01:31.000Z","dependencies_parsed_at":"2024-06-18T10:51:24.512Z","dependency_job_id":"df723fb5-4aac-4547-9fe4-9672cab1364b","html_url":"https://github.com/pytube/pytube","commit_stats":{"total_commits":1253,"total_committers":109,"mean_commits":"11.495412844036696","dds":0.6225059856344772,"last_synced_commit":"da3141f3d937459cd7cfd9180970b9ec1d14bb5e"},"previous_names":["nficano/pytube"],"tags_count":115,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pytube%2Fpytube","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pytube%2Fpytube/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pytube%2Fpytube/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pytube%2Fpytube/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pytube","download_url":"https://codeload.github.com/pytube/pytube/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253990456,"owners_count":21995773,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-wrapper","python","pythonic","youtube"],"created_at":"2024-07-30T19:00:51.288Z","updated_at":"2025-05-13T17:04:14.267Z","avatar_url":"https://github.com/pytube.png","language":"Python","funding_links":[],"categories":["Python","python","Repos","HarmonyOS","网络服务","DOWNLOADER","YouTube Bots \u0026 APIs"],"sub_categories":["Windows Manager","网络服务_其他"],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cp\u003e\n    \u003ca href=\"#\"\u003e\u003cimg src=\"https://assets.nickficano.com/gh-pytube.min.svg\" width=\"456\" height=\"143\" alt=\"pytube logo\" /\u003e\u003c/a\u003e\n  \u003c/p\u003e\n  \u003cp align=\"center\"\u003e\n\t\u003ca href=\"https://pypi.org/project/pytube/\"\u003e\u003cimg src=\"https://img.shields.io/pypi/dm/pytube?style=flat-square\" alt=\"pypi\"/\u003e\u003c/a\u003e\n\t\u003ca href=\"https://pytube.io/en/latest/\"\u003e\u003cimg src=\"https://readthedocs.org/projects/python-pytube/badge/?version=latest\u0026style=flat-square\" /\u003e\u003c/a\u003e\n\t\u003ca href=\"https://pypi.org/project/pytube/\"\u003e\u003cimg src=\"https://img.shields.io/pypi/v/pytube?style=flat-square\" /\u003e\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\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 \u0026 DASH streams\n- Support for downloading the complete playlist\n- Easily register ``on_download_progress`` \u0026 ``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\n$ python -m pip install pytube\n```\n\nSometimes, the PyPI release becomes slightly outdated. To install from the source with pip:\n\n```bash\n$ python -m pip install git+https://github.com/pytube/pytube\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\n \u003e\u003e\u003e from pytube import YouTube\n \u003e\u003e\u003e YouTube('https://youtu.be/2lAe1cqCOXo').streams.first().download()\n \u003e\u003e\u003e yt = YouTube('http://youtube.com/watch?v=2lAe1cqCOXo')\n \u003e\u003e\u003e yt.streams\n  ... .filter(progressive=True, file_extension='mp4')\n  ... .order_by('resolution')\n  ... .desc()\n  ... .first()\n  ... .download()\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```bash\n$ pytube https://youtube.com/watch?v=2lAe1cqCOXo\n```\n\nYou can also do the same for a playlist:\n```bash\n$ pytube https://www.youtube.com/playlist?list=PLS1QulWo1RIaJECMeUT4LFwJ-ghgoSH6n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpytube%2Fpytube","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpytube%2Fpytube","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpytube%2Fpytube/lists"}