%global _empty_manifest_terminate_build 0 Name: python-pytube Version: 12.1.3 Release: 1 Summary: Python 3 library for downloading YouTube Videos. License: The Unlicense (Unlicense) URL: https://github.com/pytube/pytube Source0: https://mirrors.nju.edu.cn/pypi/web/packages/9b/27/768869cb1211218a57bb5bbc7acd8dc8fe4443fe9d36b6b2302940791cfe/pytube-12.1.3.tar.gz BuildArch: noarch %description

pytube logo

pypi

### 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 $ python -m pip install pytube ``` Sometimes, the PyPI release becomes slightly outdated. To install from the source with pip: ```bash $ python -m pip install git+https://github.com/pytube/pytube ``` ### 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 import YouTube >>> YouTube('https://youtu.be/2lAe1cqCOXo').streams.first().download() >>> yt = YouTube('http://youtube.com/watch?v=2lAe1cqCOXo') >>> yt.streams ... .filter(progressive=True, file_extension='mp4') ... .order_by('resolution') ... .desc() ... .first() ... .download() ``` ### 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 ``` %package -n python3-pytube Summary: Python 3 library for downloading YouTube Videos. Provides: python-pytube BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-pytube

pytube logo

pypi

### 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 $ python -m pip install pytube ``` Sometimes, the PyPI release becomes slightly outdated. To install from the source with pip: ```bash $ python -m pip install git+https://github.com/pytube/pytube ``` ### 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 import YouTube >>> YouTube('https://youtu.be/2lAe1cqCOXo').streams.first().download() >>> yt = YouTube('http://youtube.com/watch?v=2lAe1cqCOXo') >>> yt.streams ... .filter(progressive=True, file_extension='mp4') ... .order_by('resolution') ... .desc() ... .first() ... .download() ``` ### 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 ``` %package help Summary: Development documents and examples for pytube Provides: python3-pytube-doc %description help

pytube logo

pypi

### 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 $ python -m pip install pytube ``` Sometimes, the PyPI release becomes slightly outdated. To install from the source with pip: ```bash $ python -m pip install git+https://github.com/pytube/pytube ``` ### 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 import YouTube >>> YouTube('https://youtu.be/2lAe1cqCOXo').streams.first().download() >>> yt = YouTube('http://youtube.com/watch?v=2lAe1cqCOXo') >>> yt.streams ... .filter(progressive=True, file_extension='mp4') ... .order_by('resolution') ... .desc() ... .first() ... .download() ``` ### 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 ``` %prep %autosetup -n pytube-12.1.3 %build %py3_build %install %py3_install install -d -m755 %{buildroot}/%{_pkgdocdir} if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi pushd %{buildroot} if [ -d usr/lib ]; then find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/lib64 ]; then find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/bin ]; then find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/sbin ]; then find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst fi touch doclist.lst if [ -d usr/share/man ]; then find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst fi popd mv %{buildroot}/filelist.lst . mv %{buildroot}/doclist.lst . %files -n python3-pytube -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Fri Apr 21 2023 Python_Bot - 12.1.3-1 - Package Spec generated