Metadata-Version: 2.4
Name: anime-termux
Version: 1.0.4
Summary: A user-friendly anime downloader CLI for Termux — streams from animepahe.pw with real-time search, CF cookie bypass, quality selection, and aria2c segmented downloading.
Author: anime-termux
License: MIT
Project-URL: Repository, https://github.com/anime-termux/anime-termux
Keywords: anime,downloader,termux,animepahe,android,cli,aria2c,yt-dlp
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: POSIX :: Linux
Classifier: Environment :: Console
Classifier: Topic :: Multimedia
Classifier: Topic :: Utilities
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: prompt_toolkit>=3.0.0
Requires-Dist: yt-dlp>=2024.1.0
Provides-Extra: crypto
Requires-Dist: cryptography>=41.0.0; extra == "crypto"

# anime-termux

A user-friendly anime downloader CLI for Termux (Android) and Linux, streaming from [animepahe.pw](https://animepahe.pw).

## Install

```bash
pip install anime-termux
```

**Then install curl_cffi for fully automatic Cloudflare bypass (no cookie setup needed):**

```bash
pip install curl_cffi
```

**Recommended (fastest downloads):**
```bash
pkg install aria2   # 16-thread segmented downloading
pkg install ffmpeg  # video merging
```

## Usage

```bash
anime                        # just run it
anime --dir=/sdcard/MyAnime  # custom download folder
anime --setup                # manually refresh CF cookie (rarely needed)
```

## Cloudflare bypass — how it works

| Method | How | Setup needed? |
|---|---|---|
| **curl_cffi** ✅ | TLS fingerprint impersonation (Chrome 120) | `pip install curl_cffi` then nothing |
| Chrome auto-extract | Reads cookie from Chrome's SQLite DB | Linux desktop / rooted Android only |
| Manual wizard | You paste the cookie once | Fallback for any platform |

If `curl_cffi` is installed, `anime` starts immediately with no prompts.  
If it's not installed, the tool tries to auto-read from Chrome, then falls back to a one-time manual wizard.

## Features

- **Zero-setup with curl_cffi** — `pip install curl_cffi` and `anime` just works, no cookie copy-paste ever
- **Real-time search** — suggestions from the first character you type; Tab to autocomplete
- **Quality picker** — 360p / 480p / 720p / 1080p / best
- **Segmented download** — aria2c x16 connections (falls back to yt-dlp 8-fragment mode)
- **Episode range** — single ep, ranges (`2-8`), comma lists (`1,5,10`), or `all`
- **Skip existing** — already-downloaded episodes are skipped automatically
- **Custom directory** — `anime --dir=/path/to/folder`

## Output

```
/sdcard/Anime/{Anime Title}/{Anime Title} - Ep001.mp4
```

## If curl_cffi doesn't work

curl_cffi bypasses Cloudflare by impersonating a real browser's TLS fingerprint.
This works on residential and mobile IPs. It may fail if you're on a VPN or proxy.
In that case, run `anime --setup` to use the cookie-based method instead.
