py-anime-scraper


Namepy-anime-scraper JSON
Version 0.1.3 PyPI version JSON
download
home_pageNone
SummaryAsync-first Python library for scraping anime websites, currently supporting AnimeFLV
upload_time2025-07-16 05:44:23
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseMIT
keywords anime scraping playwright async python
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Py Anime Scraper

[![PyPI Version](https://img.shields.io/pypi/v/py-anime-scraper.svg)](https://pypi.org/project/py-anime-scraper/)

[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)

<!-- [![Build Status](https://github.com/your_username/py-anime-scraper/actions/workflows/main.yml/badge.svg)](https://github.com/your_username/py-anime-scraper/actions) -->

Python library for scraping anime websites, designed to be async-first with sync support. Currently supports only **AnimeFLV**.

---

## 🚀 Features

- Asynchronous and synchronous anime search
- Retrieve detailed anime and episode information
- Download static links (aiohttp + bs4) and dynamic links (playwright for JS)
- Support for concurrent and controlled scraping
- Easily extendable to add more scrapers

---

## 📦 Installation

From PyPI:

```bash
pip install py-anime-scraper
```

From GitHub:

```bash
pip install git+https://github.com/ElPitagoras14/py-anime-scraper.git
```

---

## 🐍 Requirements

- Python >= 3.9 (tested with 3.12)
- Main dependencies: `aiohttp`, `beautifulsoup4`, `playwright`, `lxml`, `loguru`

Optional manual install:

```bash
pip install aiohttp beautifulsoup4 playwright lxml loguru
```

Then, install Chromium (only once):

```bash
playwright install chromium
```

---

## ⚙️ Basic Usage

```python
from anime_scraper.scrapers.animeflv import AnimeFLVScraper
import asyncio


async def main():
    scraper = AnimeFLVScraper()

    # Search anime
    results = await scraper.search_anime_async("naruto")
    print(results)

    # Get anime info
    info = await scraper.get_anime_info_async(results.animes[0].id)
    print(info)

    # Get static download links
    links_static = await scraper.get_static_download_links_async(
        info.id, episode_id=1
    )
    print(links_static)

    # Get dynamic download links (requires Chromium installed)
    links_dynamic = await scraper.get_dynamic_download_links_async(
        info.id, episode_id=1
    )
    print(links_dynamic)


if __name__ == "__main__":
    asyncio.run(main())
```

For synchronous use, you can do:

```python
scraper = AnimeFLVScraper()
results = scraper.search_anime("naruto")
```

---

## ⚠️ Disclaimer

This library is **for educational and personal use only**. Scraping should be done respecting the websites' terms of service and applicable laws. The author is not responsible for any misuse.

---

## 🛠️ How to add a new scraper

1. Create a class inheriting from `BaseAnimeScraper`.
2. Implement the required async methods (`search_anime_async`, `get_anime_info_async`, etc.).
3. Use `aiohttp` and `bs4` for static scraping and `playwright` for dynamic scraping when JS execution is needed.
4. Register your scraper in the package for easy use.

---

## 🧪 Development and Testing

Install development dependencies:

```bash
pip install -r requirements.txt
```

---

## 🚧 Coming Soon

Currently, **py-anime-scraper** only supports **AnimeFLV**, but support for more anime websites is in progress and will be added soon.

If you want to contribute by adding new scrapers for other sites, contributions are welcome!

---

## 📄 License

MIT © 2025 El Pitágoras

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "py-anime-scraper",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "anime, scraping, playwright, async, python",
    "author": null,
    "author_email": "\"github:ElPitagoras14\" <jonfrgar@espol.edu.ec>",
    "download_url": "https://files.pythonhosted.org/packages/88/f0/5caaafea1c2c53c253a26709d3d2e97e3a1dddf5b3725cd1d4d024b574a9/py_anime_scraper-0.1.3.tar.gz",
    "platform": null,
    "description": "# Py Anime Scraper\r\n\r\n[![PyPI Version](https://img.shields.io/pypi/v/py-anime-scraper.svg)](https://pypi.org/project/py-anime-scraper/)\r\n\r\n[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)\r\n\r\n<!-- [![Build Status](https://github.com/your_username/py-anime-scraper/actions/workflows/main.yml/badge.svg)](https://github.com/your_username/py-anime-scraper/actions) -->\r\n\r\nPython library for scraping anime websites, designed to be async-first with sync support. Currently supports only **AnimeFLV**.\r\n\r\n---\r\n\r\n## \ud83d\ude80 Features\r\n\r\n- Asynchronous and synchronous anime search\r\n- Retrieve detailed anime and episode information\r\n- Download static links (aiohttp + bs4) and dynamic links (playwright for JS)\r\n- Support for concurrent and controlled scraping\r\n- Easily extendable to add more scrapers\r\n\r\n---\r\n\r\n## \ud83d\udce6 Installation\r\n\r\nFrom PyPI:\r\n\r\n```bash\r\npip install py-anime-scraper\r\n```\r\n\r\nFrom GitHub:\r\n\r\n```bash\r\npip install git+https://github.com/ElPitagoras14/py-anime-scraper.git\r\n```\r\n\r\n---\r\n\r\n## \ud83d\udc0d Requirements\r\n\r\n- Python >= 3.9 (tested with 3.12)\r\n- Main dependencies: `aiohttp`, `beautifulsoup4`, `playwright`, `lxml`, `loguru`\r\n\r\nOptional manual install:\r\n\r\n```bash\r\npip install aiohttp beautifulsoup4 playwright lxml loguru\r\n```\r\n\r\nThen, install Chromium (only once):\r\n\r\n```bash\r\nplaywright install chromium\r\n```\r\n\r\n---\r\n\r\n## \u2699\ufe0f Basic Usage\r\n\r\n```python\r\nfrom anime_scraper.scrapers.animeflv import AnimeFLVScraper\r\nimport asyncio\r\n\r\n\r\nasync def main():\r\n    scraper = AnimeFLVScraper()\r\n\r\n    # Search anime\r\n    results = await scraper.search_anime_async(\"naruto\")\r\n    print(results)\r\n\r\n    # Get anime info\r\n    info = await scraper.get_anime_info_async(results.animes[0].id)\r\n    print(info)\r\n\r\n    # Get static download links\r\n    links_static = await scraper.get_static_download_links_async(\r\n        info.id, episode_id=1\r\n    )\r\n    print(links_static)\r\n\r\n    # Get dynamic download links (requires Chromium installed)\r\n    links_dynamic = await scraper.get_dynamic_download_links_async(\r\n        info.id, episode_id=1\r\n    )\r\n    print(links_dynamic)\r\n\r\n\r\nif __name__ == \"__main__\":\r\n    asyncio.run(main())\r\n```\r\n\r\nFor synchronous use, you can do:\r\n\r\n```python\r\nscraper = AnimeFLVScraper()\r\nresults = scraper.search_anime(\"naruto\")\r\n```\r\n\r\n---\r\n\r\n## \u26a0\ufe0f Disclaimer\r\n\r\nThis library is **for educational and personal use only**. Scraping should be done respecting the websites' terms of service and applicable laws. The author is not responsible for any misuse.\r\n\r\n---\r\n\r\n## \ud83d\udee0\ufe0f How to add a new scraper\r\n\r\n1. Create a class inheriting from `BaseAnimeScraper`.\r\n2. Implement the required async methods (`search_anime_async`, `get_anime_info_async`, etc.).\r\n3. Use `aiohttp` and `bs4` for static scraping and `playwright` for dynamic scraping when JS execution is needed.\r\n4. Register your scraper in the package for easy use.\r\n\r\n---\r\n\r\n## \ud83e\uddea Development and Testing\r\n\r\nInstall development dependencies:\r\n\r\n```bash\r\npip install -r requirements.txt\r\n```\r\n\r\n---\r\n\r\n## \ud83d\udea7 Coming Soon\r\n\r\nCurrently, **py-anime-scraper** only supports **AnimeFLV**, but support for more anime websites is in progress and will be added soon.\r\n\r\nIf you want to contribute by adding new scrapers for other sites, contributions are welcome!\r\n\r\n---\r\n\r\n## \ud83d\udcc4 License\r\n\r\nMIT \u00a9 2025 El Pit\u00e1goras\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Async-first Python library for scraping anime websites, currently supporting AnimeFLV",
    "version": "0.1.3",
    "project_urls": {
        "Homepage": "https://github.com/ElPitagoras14/py-anime-scraper",
        "Repository": "https://github.com/ElPitagoras14/py-anime-scraper"
    },
    "split_keywords": [
        "anime",
        " scraping",
        " playwright",
        " async",
        " python"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "b2abf2e6338eef04084a94bc8007c9265c48c3e214419dc78181fa8f3b9361fa",
                "md5": "b3fde341b1f3e4c3344da45a996e07fd",
                "sha256": "90d4f7be2116dd6c0a8e161a12eff6fe757221e27a9b7ddca54c67691ee504f9"
            },
            "downloads": -1,
            "filename": "py_anime_scraper-0.1.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b3fde341b1f3e4c3344da45a996e07fd",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 13508,
            "upload_time": "2025-07-16T05:44:22",
            "upload_time_iso_8601": "2025-07-16T05:44:22.364245Z",
            "url": "https://files.pythonhosted.org/packages/b2/ab/f2e6338eef04084a94bc8007c9265c48c3e214419dc78181fa8f3b9361fa/py_anime_scraper-0.1.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "88f05caaafea1c2c53c253a26709d3d2e97e3a1dddf5b3725cd1d4d024b574a9",
                "md5": "08fedabd9dc178a6a0b0abbf83526d89",
                "sha256": "1f16920eb0c9941cad004be4315768bfa60ee92ff99ff9d52c447be2f8fd2ed9"
            },
            "downloads": -1,
            "filename": "py_anime_scraper-0.1.3.tar.gz",
            "has_sig": false,
            "md5_digest": "08fedabd9dc178a6a0b0abbf83526d89",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 11871,
            "upload_time": "2025-07-16T05:44:23",
            "upload_time_iso_8601": "2025-07-16T05:44:23.650056Z",
            "url": "https://files.pythonhosted.org/packages/88/f0/5caaafea1c2c53c253a26709d3d2e97e3a1dddf5b3725cd1d4d024b574a9/py_anime_scraper-0.1.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-16 05:44:23",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ElPitagoras14",
    "github_project": "py-anime-scraper",
    "github_not_found": true,
    "lcname": "py-anime-scraper"
}
        
Elapsed time: 1.34591s