English / Russian
What is it?
Small project with one main function - download a video from RuTube(it's a russian copy of YouTube).
How to use it?
UI
- Download executable file from Releases.
CLI
- Install library
pip install async_rutube_downloader
- Run
rtube-cli https://rutube.ru/video/365ae8f40a2ffd2a5901ace4db799de7/
rtube-cli --helpoutput
❯ rtube-cli
usage: rtube-cli [-h] [-o] [-q] [-v] [-f] [-d] [url]
This CLI utility allows you to download videos from Rutube.
- You can download a single video or multiple videos by providing a file with URLs.
- By default, videos from a file will be downloaded in the best available quality.
positional arguments:
url URL or ID of the Rutube video
options:
-h, --help show this help message and exit
-o , --output Output directory (default: current working directory)
-q, --quality Select video quality interactively
-v, --version show program's version number and exit
Multiple videos download:
-f , --file Path to the file with URLs
-d , --delimiter Delimiter between URLs in the file(default: \n)
Usage examples:
- Download single video:
[rtube-cli] 365ae8f40a2ffd2a5901ace4db799de7
[rtube-cli] https://rutube.ru/video/365ae8f40a2ffd2a5901ace4db799de7/
[rtube-cli] https://rutube.ru/video/365ae8f40a2ffd2a5901ace4db799de7/ -q
- Download multiple videos:
[rtube-cli] -f ~/path/to/file1.txt
[rtube-cli] -f ~/path/to/file2.txt -d ,
Use in code
- Install library
pip install async_rutube_downloader
- Use example
qualities is a tuple, like: ((1280, 720), (1920,1080))
- async
import asyncio
from async_rutube_downloader.rutube_downloader import RutubeDownloader
async def download():
downloader = RutubeDownloader(
"https://rutube.ru/video/365ae8f40a2ffd2a5901ace4db799de7/"
)
qualities = await downloader.fetch_video_info()
await downloader.select_quality(max(qualities))
await downloader.download_video()
asyncio.run(download())
- sync
import asyncio
from async_rutube_downloader.rutube_downloader import RutubeDownloader
loop = asyncio.new_event_loop()
downloader = RutubeDownloader(
"https://rutube.ru/video/365ae8f40a2ffd2a5901ace4db799de7/", loop
)
qualities = loop.run_until_complete(downloader.fetch_video_info())
loop.run_until_complete(downloader.select_quality(max(qualities)))
loop.run_until_complete(downloader.download_video())
loop.close()
Source code
About
This project was created for learning purposes and was inspired by a similar synchronous library and a book about async.
Technical Features
- TKinter UI
argparse(stdlib) CLI- The honest progress bar shows the actual download progress.
- UI and loading work in different threads.
- UI localization.
- The async version allows you to use the full speed of your internet connection.
- PyInstaller is used to create an executable file.
Dependencies
| title | description |
|---|---|
| m3u8 | Used for playlist parsing |
| aiohttp | Async http client |
| aiofiles | async work with files |
| slugify | Convert video title to file name |
| CustomTkinter | Better TKinter UI |
Metadata
Release files for async_rutube_downloader 1.4.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| async_rutube_downloader-1.4.2.tar.gz | 17.3 kB | Without provenance | Details for async_rutube_downloader-1.4.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| async_rutube_downloader-1.4.2-py3-none-any.whl | Python 3 | none | any | Details for async_rutube_downloader-1.4.2-py3-none-any.whl |
Total release size: 41.8 kB
Release files / async_rutube_downloader-1.4.2.tar.gz
| Download URL | async_rutube_downloader-1.4.2.tar.gz |
|---|---|
| Size | 17.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
57c581c57c795a0b2bfee2e9af802c00f3eb9fadd34cdcdc775002f0cf0eb6bf
|
|
BLAKE2b-256 checksum How to use checksums |
920e1fa4bc328e9d0898739c5577be894e3c065d7f98e13d765a7dfb809aed6e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.3 CPython/3.12.8 Linux/6.11.0-1015-azure
|
Release files / async_rutube_downloader-1.4.2-py3-none-any.whl
| Download URL | async_rutube_downloader-1.4.2-py3-none-any.whl |
|---|---|
| Size | 24.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a6a927dcb795cb219283b6961e1f5ed3e8bded6a983f02cfda359c9f380b4429
|
|
BLAKE2b-256 checksum How to use checksums |
da3fd387734f56d394012b5a9a5ef419d0fef7da838f5be79fa18c4d3b261d2f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.3 CPython/3.12.8 Linux/6.11.0-1015-azure
|
Security for async_rutube_downloader 1.4.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.