Skip to main content

API Wrapper for neko-sama.fr

Project description

Nekosama

This is a python package for using with the NekoSama anime website.

pip install nekosama

CLI Usage

This package can be used as a CLI tool.

$ python -m nekosama -h
usage: nekosama [-h] -i INPUT [-e EPISODES] [-o OUTPUT] [-q {1080p,720p,480p}]

options:
  --input INPUT               An anime URL
  --episodes EPISODES         List or range or episodes indexes (e.g. 0-5 or 1,2,3)
  --output OUTPUT             Output directory
  --quality {1080p,720p,480p} Video quality

Examples:

$ nekosama -i <url>          # Download a whole anime
$ nekosama -i <url> -q 480p  # Download in worst quality
$ nekosama -i <url> -e 1     # Download the first episode of an anime
$ nekosama -i <url> -e 1-8   # Download episodes 1 to 8 (included)
$ nekosama -i <url> -e 1,4,9 # Download specific episodes

Package quickstart

import nekosama

# Initialise a core
core = nekosama.Core()

# Search for animes
for anime in core.database.search(query = 'slime'):
    print(anime.title)

# Get an anime from a URL
anime = core.get('https://neko-sama.fr/anime/info/9520-tensei-shitara-slime-datta-ken_vostfr')

# List episodes
for episode in anime.episodes:
    print(episode.index, ':', episode.url)

# Download an episode
anime.episodes[0].download(
    path = 'ep1.mp4',
    quality = 1080
)

For more documentation, have a look at the source code and the docstrings.

License

This project uses the MIT license. See the LICENSE file for more informations.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nekosama-4.1.tar.gz (8.8 kB view hashes)

Uploaded Source

Built Distribution

nekosama-4.1-py3-none-any.whl (10.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page