Metadata-Version: 2.4
Name: leader-dl
Version: 2026.10.22
Summary: Simple YouTube downloader library (video / audio) built on pytubefix
License: MIT
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pytubefix>=8.8.1
Requires-Dist: inquirer>=3.0.0
Requires-Dist: yaspin>=3.0.0
Requires-Dist: typer>=0.9.0
Requires-Dist: requests>=2.28.0
Requires-Dist: aiohttp>=3.8.0
Requires-Dist: rich>=13.0.0
Requires-Dist: termcolor>=2.0.0
Requires-Dist: moviepy>=1.0.0
Dynamic: license-file

# leader

Simple YouTube downloader library for Python (video 360p / audio m4a), built on `pytubefix`.
Fork of [VOLT5775/VoLTGoLD-YT](https://github.com/VOLT5775/VoLTGoLD-YT) (MIT license).

## Install

```bash
pip install git+https://github.com/YOUR_USERNAME/leader.git
# a specific version (git tag):
pip install git+https://github.com/YOUR_USERNAME/leader.git@v2026.10.22
```

Requires `ffmpeg` (`sudo apt install ffmpeg -y`).

## Usage

```python
from leader import download_video, download_audio

path = download_video("https://www.youtube.com/watch?v=VIDEO_ID")
audio = download_audio("https://www.youtube.com/watch?v=VIDEO_ID", out_dir="music")
```

Async (for bots):

```python
from leader import download_video_async, DownloadError

try:
    path = await download_video_async(url)
except DownloadError as e:
    print("failed:", e)
```

## Notes
- On a server, the first download may ask you to log in with Google (OAuth device code). Run it once in the terminal.
  To disable OAuth: `export LEADER_OAUTH=0`.
- Telegram bots can upload files up to 50MB only.
- Download only content you have the right to download.

## CLI
```bash
leader "https://www.youtube.com/watch?v=VIDEO_ID" -a
```

## License
MIT. Original work © Ebraheem Alhetari; fork changes by the leader maintainers.
