Skip to content

AliHaSSan-13/AnimeKAI-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Anime Downloader

Python 3.12 FastAPI License: MIT

A high-performance, asynchronous anime scraper and downloader. This project transitions from legacy synchronous architecture to a modern, decoupled, and scalable ecosystem using FastAPI for the backend.

🚀 Key Features

  • Modular Architecture: Cleanly separated API, extraction, and download layers.
  • High Performance: Built with asyncio and httpx for non-blocking network I/O.
  • Dual-Engine Download System:
    • aria2c for fast, efficient static file downloads.
    • ffmpeg for robust HLS/M3U8 stream processing and stitching.
  • Resilient Scraping: Built-in JSON-based caching and dynamic User-Agent rotation.
  • Unified API: A clean RESTful interface for all functionality (search, stream resolution, download management).

🏗️ Architecture

anime_downloader/
├── api/                # FastAPI Backend (Endpoints)
├── core/               # Shared logic, config, cache, logging
├── downloader/         # Download engines (aria2c/ffmpeg)
├── extractors/         # Async scraping logic (Provider interface)
├── tests/              # Test suite (pytest)
└── requirements.txt    # Project dependencies

🚀 Getting Started

Prerequisites

  • Python 3.12+
  • aria2c: Installed and available in PATH.
  • ffmpeg: Installed and available in PATH.

1. Installation

# Clone the repository
git clone https://github.com/AliHaSSan-13/AnimeKAI-API
cd Anime_Downloader

# Create and activate virtual environment
python -m venv .venv
source .venv/bin/activate

# Install dependencies
pip install -r requirements.txt

2. Configuration

Set up your aria2c daemon:

aria2c --enable-rpc --rpc-listen-port=6800 --rpc-secret=YOUR_SECRET_TOKEN --daemon

3. Usage

Always run the application from the project root directory.

Start the API:

python -m uvicorn api.main:app --port 8000

Access the API documentation at http://localhost:8000/docs once the server is running.

🧪 Testing

Run the test suite using pytest:

python -m pytest

📜 Disclaimer

This software is for educational purposes only. Always respect the Terms of Service of the content providers. The author takes no responsibility for how this tool is used.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Anime Kai - Unofficial REST API A high-performance, developer-first scraping engine that provides seamless access to AnimeKai's massive library. This API handles all the heavy lifting—from rich metadata discovery (Search, Home, Details) to automated decryption and downloading of direct m3u8 streaming links.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages