Metadata-Version: 2.4
Name: AnimeScraper
Version: 1.1.9
Summary: A Simple library to get Anime and Character information. It scrapes all information from MyAnimeList website.
Project-URL: Homepage, https://github.com/togashigreat/AnimeScraper
Project-URL: Repository, https://github.com/togashigreat/AnimeScraper
Author: Muhammad MuQiT
License-Expression: GPL-3.0-only
License-File: LICENSE.md
Keywords: anime,anime api,anime cli,anime library,anime scraper,fastapi,manga,myanimelist,python anime
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Requires-Dist: aiohttp<4,>=3.11.6
Requires-Dist: aiolimiter<2,>=1.2.0
Requires-Dist: aiosqlite<1,>=0.20.0
Requires-Dist: beautifulsoup4<5,>=4.12.1
Requires-Dist: click<9,>=8.1.7
Requires-Dist: httpx<1,>=0.28.0
Provides-Extra: dev
Requires-Dist: furo>=2024.8.6; extra == 'dev'
Requires-Dist: pytest-asyncio<1,>=0.24.0; extra == 'dev'
Requires-Dist: pytest<9,>=8.3.4; extra == 'dev'
Requires-Dist: sphinx-rtd-theme<4,>=3.0.2; extra == 'dev'
Requires-Dist: sphinx<9,>=8.1.3; extra == 'dev'
Provides-Extra: server
Requires-Dist: fastapi>=0.115.4; extra == 'server'
Requires-Dist: uvicorn>=0.32.0; extra == 'server'
Description-Content-Type: text/markdown

<div align="center">

# AnimeScraper

![AnimeScraper Logo](./docs/assets/animescrapper.png)


![PyPI - Python Version](https://img.shields.io/pypi/pyversions/AnimeScraper)


**AnimeScraper** is an Open Source Python library designed for scraping and parsing anime-related data from MyAnimeList. With support for asynchronous requests, it allows you to fetch detailed informations about anime, characters, and more efficiently.

</div>


## 🚀 Features

- Fetch detailed anime and character details
- Asynchronous Fast data retrieval
- Caching 
- Easy-to-use API
- Fully typed and documented
- Supports Synchronous as well
- Comes with a Cli too
- FastAPI Server with Caching config 


## 🛠️ Installation

You can install AnimeScraper using pip:

```bash
pip install AnimeScraper
```

To install fastapi local server:

```bash
pip install AnimeScraper[server]

```


## Cli Tool
You can use AnimeScraper in your command line too. Type `animescraper` for Usage. Available commands `search-anime`, `get-anime`, `search-character` etc. look at the Documentation for more information.

**Example:**

<div align="center">

![AnimeScraper Cli Demo](./docs/assets/cli_demo_rikka.jpg)
![AnimeScraper Cli Demo](./docs/assets/cli_demo_anime.jpg)

</div>



## 📖 Quick Start

### Synchronous

This library supports both Synchronous and Asynchronous.

**Searching and Fetching Anime**

```python
from AnimeScraper import SyncKunYu

scraper = SyncKunYu()
anime = scraper.search_anime("Chuunibyo demo koi ga shita")

print(anime.title)
print(anime.stats.rank)

```
**Searching and fetching Character**

```python
from AnimeScraper import SyncKunYu

scraper = SyncKunYu()
character = scraper.search_character("Takanashi Rikka")

print(character.about)
print(character.description)
```


### Asynchronous


**Searching Anime** 

```python
import asyncio
from AnimeScraper import KunYu

async def main():
    scraper = KunYu()
    anime = await scraper.search_anime("violet evergarden")  # Violet Evergarden
    print(anime.title)
    print(anime.synopsis)
    print(anime.characters[0].name)

asyncio.run(main())
```


**Searching Character** 

```python
import asyncio
from AnimeScraper import KunYu

async def main():
    scraper = KunYu()
    # Search and Fetch Character detials by name
    # chekc docs for all Available attributes 
    character = await scraper.search_character("Killua Zoldyck")
    print(character.name)
    print(character.url)

asyncio.run(main())
```


**Fetching Anime details**

```python
import asyncio
from AnimeScraper import KunYu

async def main():
    # Use async Context manager to fetch multiple anime with same session
    async with KunYu() as scraper:
        anime = await scraper.get_anime("32281")  # Fullmetal Alchemist: Brotherhood
        print(anime.stats.score)
        print(anime.characters[0].name)

asyncio.run(main())

```

## 📖 Documentation

Detailed documentation is available. [Check out the Documentation](https://animescraper.readthedocs.io/en/latest/)

## 🌟 Key Components

- `KunYu`: Main interface for scraping anime and character data
- `Anime`: Detailed anime information model
- `Character`: Comprehensive character details model
- Asynchronous scraping with `aiohttp`


## 🔧 Requirements

- Python 3.10+
- aiohttp
- httpx
- pydantic
- uvicorn 

## 📦 Project Structure

```
AnimeScraper/
│
├── AnimeScraper/
│   ├── Scraper.py       # Main scraping interface
│   ├── _model.py        # Data models
│   ├── malscraper.py    # HTTP connection handler
│   └── _parse_anime_data.py  # HTML parsing utilities
│
├── docs/                # Sphinx documentation
├── tests/               # Unit tests
└── pyproject.toml       # Project configuration
```
## 📄 License

Distributed under the GPL-V3.0 License. See [LICENSE](./LICENSE.md) for more information.

## 📞 Contact

[Facebook](https://facebook.com/KiyotakaO.O)
[Telegram](t.me/togayuuta)
