A Simple library to get Anime and Character information. It scrapes all information from Myanimelist website.
Project description
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 information about anime, characters, and more efficiently.
🚀 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:
pip install animescraper
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:
📖 Quick Start
Synchronous
This library supports both Synchronous and Asynchronous.
Searching and Fetching Anime
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
from AnimeScraper import SyncKunYu
scraper = SyncKunYu()
character = scraper.search_character("Takanashi Rikka")
print(character.about)
print(character.description)
Asynchronous
Searching Anime
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
import asyncio
from AnimeScraper import KunYu
async def main():
scraper = KunYu()
# Search and Fetch Character detials by name
character = await scraper.search_character("Killua Zoldyck")
print(character.name)
print(character.url)
asyncio.run(main())
Fetching Anime details
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
🌟 Key Components
KunYu: Main interface for scraping anime and character dataAnime: Detailed anime information modelCharacter: 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 for more information.
📞 Contact
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file animescraper-1.1.8.tar.gz.
File metadata
- Download URL: animescraper-1.1.8.tar.gz
- Upload date:
- Size: 28.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c0694b5121bbef81f19b05d2c027fe5e9b31f7256c2a9c672dbc8ed87a4c54b3
|
|
| MD5 |
78550508e750b372f5093ae41861b660
|
|
| BLAKE2b-256 |
0871bd9c6d42764efc812f8ac3cb9dc075accaadd9a9b8367b22ee6f5fa081b3
|
Provenance
The following attestation bundles were made for animescraper-1.1.8.tar.gz:
Publisher:
python-publish.yml on togashigreat/AnimeScraper
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
animescraper-1.1.8.tar.gz -
Subject digest:
c0694b5121bbef81f19b05d2c027fe5e9b31f7256c2a9c672dbc8ed87a4c54b3 - Sigstore transparency entry: 157199047
- Sigstore integration time:
-
Permalink:
togashigreat/AnimeScraper@b9aa7a1ef48a98ab2e41326f078fa9c4fe667da2 -
Branch / Tag:
refs/tags/v1.1.8 - Owner: https://github.com/togashigreat
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@b9aa7a1ef48a98ab2e41326f078fa9c4fe667da2 -
Trigger Event:
release
-
Statement type:
File details
Details for the file animescraper-1.1.8-py3-none-any.whl.
File metadata
- Download URL: animescraper-1.1.8-py3-none-any.whl
- Upload date:
- Size: 34.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
10b5837153bd04810d98b8d7d967e313d7d77a2c42cea95152b5ef6f7e8abff8
|
|
| MD5 |
ab83fd2e84ffb7fa88f1bbb83a7f4a80
|
|
| BLAKE2b-256 |
a2cab2ce84b0acd9e408a216c656094e82080a819b456ed3d49f45e8cba7aae3
|
Provenance
The following attestation bundles were made for animescraper-1.1.8-py3-none-any.whl:
Publisher:
python-publish.yml on togashigreat/AnimeScraper
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
animescraper-1.1.8-py3-none-any.whl -
Subject digest:
10b5837153bd04810d98b8d7d967e313d7d77a2c42cea95152b5ef6f7e8abff8 - Sigstore transparency entry: 157199050
- Sigstore integration time:
-
Permalink:
togashigreat/AnimeScraper@b9aa7a1ef48a98ab2e41326f078fa9c4fe667da2 -
Branch / Tag:
refs/tags/v1.1.8 - Owner: https://github.com/togashigreat
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@b9aa7a1ef48a98ab2e41326f078fa9c4fe667da2 -
Trigger Event:
release
-
Statement type: