A state-of-the-art, high-performance parallel downloader for kaa.lt (KickAssAnime) with automatic subtitle conversion and lossy-free chapter skip-time embedding.
- 🚀 3-Stage Parallel Pipeline — Scraping, downloading, and embedding run concurrently on separate workers.
- ⏱️ Dynamic Chapter Skip Times — Integrates Jikan & AniSkip APIs to automatically embed
OpeningandEndingtimestamps as chapters into the final video (compatible with VLC, MPV, MPC-HC, etc.). - 💬 Auto Subtitle Embedding — Subtitles are downloaded as
.vtt, natively converted to.srt, and multiplexed into the.mkvfile withdefault+forcedflags. - 🔍 Interactive Search & Range Selection — Search for anime by name directly in the terminal, and choose custom download ranges (e.g. single episode, starting from episode X, or range X to Y).
- 🎛️ Configurable Filenames — Choose from 5 different naming conventions (
standard,full,short,season,episode) to match your media server structure (e.g. Plex, Jellyfin). - 🚦 Smart Rate Limiting & Timeouts — Configurable request delays and HLS fragment socket timeouts to prevent rate limits and terminal hangs.
- 🛡️ Graceful Interrupts — Responds to
Ctrl+Cby finishing current downloads before exiting safely.
┌─────────────────────────────────────────────────────────────┐
│ PARALLEL EXECUTION MODEL │
├─────────────────────────────────────────────────────────────┤
│ │
│ [SCRAPER THREAD] [DOWNLOAD WORKERS] [EMBED WORKERS] │
│ │ │ │ │
│ Scrapes URLs ───▶ [Download Queue] │ │
│ (Details API) │ │ │
│ Worker 1 (yt-dlp) │ │
│ Worker 2 (yt-dlp) ──▶ [Embed Queue] │
│ ▼ │ │
│ (Raw MP4 Streams) Worker 1 │
│ Worker 2 │
│ ▼ │
│ (FFmpeg Muxing)│
│ ▼ │
│ (Final .mkv) │
└─────────────────────────────────────────────────────────────┘
# Install Python 3.13
winget install Python.Python.3.13
# Install FFmpeg (required for muxing and chapters)
winget install Gyan.FFmpeg# Clone the repository
git clone git@github.com:mian196/KAA-Downloader.git
cd KAA-Downloader
# Create and activate venv
python -m venv .venv
.venv\Scripts\activate
# Install requirements
pip install -r requirements.txtCopy the example configuration to create your local .env:
cp .env.example .envSimply launch the program without arguments to search for anime or enter custom URLs:
python main.pypython main.py -s "Horimiya"python main.py -u "https://kaa.lt/horimiya-1e9c"python main.py -u "https://kaa.lt/horimiya-1e9c" --fetch-onlypython main.py --from-csv "output/Horimiya (Sub)/Horimiya_episodes.csv"Every aspect of the downloader is customizable via settings inside the .env file:
| Parameter | Default | Description |
|---|---|---|
| ANIME_URL | None |
If set, skips the interactive input and starts downloads immediately. |
| ANIME_URLS | None |
Comma-separated list of URLs to process sequentially in queue mode. |
| DOWNLOAD_WORKERS | 6 |
Number of concurrent yt-dlp download processes. |
| EMBED_WORKERS | 4 |
Number of concurrent FFmpeg subtitle/chapter muxers. |
| OUTPUT_DIR | output |
Directory where downloaded anime folders are stored. |
| DOWNLOAD_ALL | false |
If false, prompts you for custom episode ranges (all, single, start X, range X-Y). |
| VERBOSE | true |
Outputs real-time progress and logs from yt-dlp. |
| LOG_LEVEL | INFO |
Level of terminal verbosity (DEBUG, INFO, WARNING, ERROR). |
| RESOLUTION | 720 |
Desired video quality (720, 1080). |
| AUDIO_TYPE | sub |
Language track to extract (sub for Japanese, dub for English). |
| EMBED_CHAPTERS | true |
Enables AniSkip skip-time chapter embedding in output video files. |
| FILENAME_FORMAT | standard |
Template for output files (standard, full, short, season, episode). |
| DOWNLOAD_DELAY | 2 |
Delay in seconds between starting downloads (prevents server throttling). |
| DOWNLOAD_TIMEOUT | 3600 |
Max seconds allowed for downloading a single episode stream. |
| Format | Naming Pattern | Example Output |
|---|---|---|
episode |
E{ep} |
E02.mkv |
season |
S{season}E{ep} |
S01E02.mkv |
short |
{ShortTitle} - S{season}E{ep} |
Bleach - S01E02.mkv |
standard |
{CleanTitle} - S{season}E{ep} |
Bleach TYBW The Conflict - S01E02.mkv |
full |
{CleanTitle} - S{season}E{ep} - {EpTitle} |
Bleach TYBW The Conflict - S01E02 - Kill The King.mkv |
KAA-Downloader/
├── main.py # Main pipeline manager & worker threads
├── config.py # Parses settings from .env
├── requirements.txt # Python dependencies
├── .env.example # Template configuration
│
├── extractors/ # Extraction logic
│ ├── __init__.py
│ ├── hianime.py # Base extractor & model dataclasses
│ └── kickassanime.py # KAA-specific API parsing & decoders
│
└── tools/ # Utilities
├── __init__.py
├── functions.py # Console input handlers & file operations
└── thread_logger.py # Synchronized console logging
Special thanks to the original creators whose repositories laid the foundation for this fork:
- Base Codebase: HianimeDownloader by @gheatherington
- yt-dlp Plugin: yt-dlp-hianime by @pratikpatel8982