Metadata-Version: 2.4
Name: misato
Version: 1.0.0
Summary: MissAV video downloader
Author: Misato Contributors
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: curl_cffi>=0.7.0
Requires-Dist: playwright>=1.43.0
Requires-Dist: pydantic>=2.7.0
Requires-Dist: pydantic-settings>=2.2.0
Requires-Dist: tqdm>=4.66.0
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == "dev"
Dynamic: license-file

# misato

MissAV video downloader with multi-threading, resume support, and Cloudflare bypass.

[![PyPI](https://img.shields.io/pypi/v/misato)](https://pypi.org/project/misato/)

## Installation

```bash
pip install misato
```

### Prerequisites

1. **Playwright** — misato uses headless Chromium (bundled with Playwright). No system Chrome required.
   ```bash
   playwright install chromium
   ```

2. **FFmpeg** (optional, recommended) — for merging video segments and embedding cover thumbnails. https://ffmpeg.org/

## Usage

```bash
# Download a single video
misato -auto "https://missav.ai/dm87/pppd-695" -ffcover -title

# Search and download
misato -search PPPD-695 -ffcover -title

# Batch download a playlist
misato -auto "https://missav.ai/dm132/actresses/JULIA" -limit 20 -ffmpeg

# Download from a URL list file
misato -file urls.txt -title

# Use a proxy
misato -auto "..." -proxy localhost:7890
```

### Options

| Option | Description |
|--------|-------------|
| `-auto URL [URL ...]` | Video or playlist URLs (can be mixed) |
| `-search CODE` | Search by video code (e.g. `PPPD-695`) |
| `-file PATH` | Read URLs from a text file (one per line) |
| `-limit N` | Maximum number of videos to download |
| `-proxy host:port` | HTTP/HTTPS proxy |
| `-ffmpeg` | Merge segments with FFmpeg |
| `-cover` | Download cover image |
| `-ffcover` | Cover + FFmpeg merge + embed as video thumbnail |
| `-title` | Use full video title as filename |
| `-quality 720` | Preferred resolution (defaults to highest) |
| `-noban` | Suppress the ASCII art banner |
| `-retry N` | Retries per segment (default: 5) |
| `-delay N` | Delay between retries in seconds (default: 2) |
| `-timeout N` | Timeout per segment in seconds (default: 10) |
| `-threads N` | Number of download threads (default: CPU core count) |

### Supported playlist URLs

`-auto` accepts the following URL types:

- Search filters: `"https://missav.ai/search/JULIA?filters=uncensored-leak&sort=saved"`
- Actress pages: `"https://missav.ai/dm132/actresses/JULIA"`
- Label pages: `"https://missav.ai/dm21/en/makers/Takara%20Visual"`
- Genre/tag pages: `"https://missav.ai/dm1/en/genres/4K"`
- Public playlists: `"https://missav.ai/playlists/ewzoukev"`

> Wrap URLs containing spaces or special characters in double quotes.

## Features

- **Multi-threaded** — concurrent segment downloads (uses all CPU cores by default)
- **Headless** — no Chrome window needed, no system Chrome install required
- **Resume** — interrupted downloads pick up where they left off
- **Auto-retry** — failed segments are retried with doubled persistence
- **Connection pooling** — curl_cffi with TLS fingerprint impersonation for download speed
- **Live progress** — progress bar with download speed and ETA

## Disclaimer

This project is provided for **educational and communication purposes only**. It is intended to facilitate learning and technical exchange. Users are solely responsible for ensuring that their use of this software complies with all applicable laws and regulations in their jurisdiction.

- Do not use this software to download or distribute copyrighted material without proper authorization from the rights holders.
- Do not use this software to engage in any activity that violates local, national, or international laws.
- The developers assume no liability for any misuse of this software or any consequences arising from its use.

By using this software, you acknowledge that you have read and understood this disclaimer and agree to use it in a lawful and responsible manner.

See [LICENSE](LICENSE) for details.
