Metadata-Version: 2.4
Name: pkg-anime-1
Version: 1.4.1
Summary: AnimePahe terminal downloader — ARM7/Termux compatible with automatic Cloudflare bypass
License: MIT
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: beautifulsoup4
Requires-Dist: requests
Requires-Dist: inquirerpy
Requires-Dist: pycryptodome
Requires-Dist: rich
Requires-Dist: tqdm
Provides-Extra: desktop
Requires-Dist: drissionpage; extra == "desktop"
Provides-Extra: android
Requires-Dist: uiautomator2; extra == "android"
Provides-Extra: android-arm64
Requires-Dist: uiautomator2; extra == "android-arm64"
Requires-Dist: mitmproxy; extra == "android-arm64"
Provides-Extra: fast
Requires-Dist: curl-cffi; extra == "fast"
Provides-Extra: all
Requires-Dist: drissionpage; extra == "all"
Requires-Dist: uiautomator2; extra == "all"
Requires-Dist: curl-cffi; extra == "all"

# pkg-anime-1

AnimePahe terminal downloader — works on PC, ARM64, and ARM7 (Termux/Android).

## Install

```bash
pip install pkg-anime-1
```

## Usage

```bash
anime                      # interactive search + download
anime -a "naruto"          # search directly
anime -q 1080 --audio eng  # set quality and audio
anime --config             # show current settings
```

## Platform support

| Platform | Cloudflare bypass method |
|---|---|
| PC / Linux / macOS | DrissionPage auto-launches Chrome, clicks the challenge, harvests the cookie |
| ARM64 / ARM7 Termux | **uiautomator2** taps the checkbox automatically + **mitmproxy** intercepts the cookie — zero manual steps |
| Any (fast path) | `curl-cffi` Chrome TLS fingerprint — install with `pip install "pkg-anime-1[fast]"` |

## Android / Termux setup

**ARM7 (32-bit phones — 2 GB RAM devices):**
```bash
pip install "pkg-anime-1[android]"
python3 -m uiautomator2 init   # installs automation agent on device (once)
anime
```

**ARM64 (64-bit phones):**
```bash
pip install "pkg-anime-1[android-arm64]"
python3 -m uiautomator2 init
anime
```

The tool opens Chrome automatically, clicks the Cloudflare checkbox, and saves the cookie.
The cookie persists so the bypass only runs once per session expiry.

> **Why two extras?**  
> `mitmproxy` (used for automatic cookie interception on ARM64) requires the `cryptography`
> package which needs Rust to compile. Rust has no ARM7 Android target, so mitmproxy cannot
> install on 32-bit phones. The `[android]` extra uses uiautomator2 alone, which is pure
> Python and works on all ARM devices.

## Optional extras

```bash
pip install "pkg-anime-1[desktop]"      # DrissionPage for PC auto-bypass
pip install "pkg-anime-1[android]"      # uiautomator2 — ARM7 + ARM64 safe
pip install "pkg-anime-1[android-arm64]"# uiautomator2 + mitmproxy — ARM64 only
pip install "pkg-anime-1[fast]"         # curl-cffi Chrome fingerprint (ARM64+, PC)
pip install "pkg-anime-1[all]"          # desktop + android + fast (no mitmproxy)
```
