Metadata-Version: 2.4
Name: ytfetch
Version: 2.1.0
Summary: A wrapper for yt-dlp with custom simple fetching flags
Project-URL: Homepage, https://github.com/voidsnax/ytFetch
Author: voidsnax
License: MIT
License-File: LICENSE
Keywords: converter,h264,mp3,playlist,youtubedownloader
Requires-Python: >=3.8
Requires-Dist: colorama
Requires-Dist: yt-dlp[curl-cffi,default]
Description-Content-Type: text/markdown

# ytFetch

**ytfetch** simplifies media downloading and playlist management by adding  playlist searching, and streamlined format handling on top of the powerful [yt-dlp](https://github.com/yt-dlp/yt-dlp) engine.

## ✨ Features

* **Search:** Use `-list` to display or search across single or multiple playlists contents.
* **Direct Download:** Single flag to download in legacy `avc/h.264` and `mp3` format and audio only extraction.
* **Video Quality:** Mention preffered video quality directly.
* **Native Compatibility:** Can also pass through any `yt-dlp` flag.
* **Minimal Output logs:** Clean and minimal logs.

## 📋 Requirements

- [Python](https://www.python.org/): 3.8 or higher.
- [FFmpeg](https://ffmpeg.org/) and [FFprobe](https://ffmpeg.org/ffprobe.html): Should available in your system PATH.
Download builds from [here](https://ffmpeg.org/download.html)

    <details>
    <summary>or</summary>

    - On Windows:
        ```bash
        winget install BtbN.FFmpeg.GPL
        ```
        or
        ```bash
        winget install Gyan.FFmpeg
        ```

    - On Termux (android):
        ```bash
        pkg install ffmpeg
        ```

    - On Mac (using Homebrew):
        ```bash
        brew install ffmpeg
        ```

    - On Arch Linux:
        ```bash
        sudo pacman -S ffmpeg
        ```

    - On Ubuntu/Debian:
        ```bash
        sudo apt install ffmpeg
        ```
    </details>
- [Deno](https://deno.com/): Or other JavaScript runtime/engine like [node.js](https://nodejs.org/en) or [bun](https://bun.sh/)

  Check this [guide](https://github.com/yt-dlp/yt-dlp/wiki/EJS) for more info.
  Also check [yt-dlp dependency](https://github.com/yt-dlp/yt-dlp#dependencies) for optional dependencies.


## 📦 Installation

### via pip

```bash
pip install ytfetch
```

### via source
```bash
git clone https://github.com/voidsnax/ytFetch.git
cd ytFetch
pip install -e .
```

## 🚀 Usage

### General Syntax and Options

```text
usage: ytfetch URL ... [OPTIONS] [yt-dlp OPTIONS]

options:
  -h                         Show this help message and exit
  --help                     Show yt-dlp help message and exit
  -avcmp3                    Download video in AVC (h.264) & audio in mp3 format
  -q QUALITY                 Video quality (e.g., 1080, 720). Default is 1080
  -mp3                       Extract audio only as MP3
  -audio                     Extract audio only
  -list [NAME]               List playlist contents. Accepts values for searching across playlist

output template aliases:
  -o autonumber/num   -> playlist-numbered naming
  -o music/song       -> title + artist naming
  -o default          -> default naming
```

### Examples

#### Basic Downloading

Download a video at the default best quality
```bash
ytfetch "VIDEO_URL"
```
Download a video in 720p
```bash
ytfetch "VIDEO_URL" -q 720
```
#### Format Conversion

Download as AVC(H.264) and Mp3 in MP4 Container
```bash
ytfetch "VIDEO_URL" -avcmp3
```
Extract Audio Only in Mp3
```bash
ytfetch "VIDEO_URL" -mp3
```

#### Listing and Searching

List a Playlist
```bash
ytfetch "PLAYLIST_URL" -list
```
Search through a playlist
```bash
ytfetch "PLAYLIST_URL" -list "remix"
```

#### Passthrough Options

You can append any standard yt-dlp option to your command. Both long and short flags are supported.

Download via Proxy
```bash
ytfetch --proxy "socks5://127.0.0.1:1080" "VIDEO_URL"
```
Use Cookies
```bash
ytfetch --cookies "cookies.txt" "VIDEO_URL"
```
Limit Speed
```bash
ytfetch -r "500K" "VIDEO_URL"
```
Selected range Search
```bash
ytfetch "PLAYLIST_URL"  -I ":50" -list "search_word"
```
*and so on...*

## 🔖 License

MIT License
