Socket
Book a DemoInstallSign in
Socket

AnimeScraper

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

AnimeScraper

A Simple library to get Anime and Character information. It scrapes all information from Myanimelist website.

1.1.8
pipPyPI
Maintainers
1

AnimeScraper

AnimeScraper Logo

PyPI - Python Version

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:

AnimeScraper Cli Demo AnimeScraper Cli Demo

šŸ“– 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 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 for more information.

šŸ“ž Contact

Facebook Telegram

Keywords

anime

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with āš”ļø by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.