Skip to main content

Little tool in python to watch anime from the terminal (the better way to watch anime)

Project description

waving

https://user-images.githubusercontent.com/63876564/162056019-ed0e7a60-78f6-4a2c-bc73-9be5dc2a4f07.mp4

Little tool written in python to watch and download anime from the terminal (the better way to watch anime), also applicable as an API.

Scrapes: https://gogoanime.gg

If you dont like to use a cli there is a GUI and other versions here.

Contents

Installation

PyPI

Recommended installation:

python3 -m pip install anipy-cli --upgrade

Directly from the repo (may be newer):

python3 -m pip install git+https://github.com/sdaqo/anipy-cli

For video playback mpv is needed. Get it here: https://mpv.io/installation/

If you would like to use another video player, you will need to specify its path in the config file.

Optionally, you can install ffmpeg to download m3u8 playlists instead of using the internal downloader. You can use it with the -f flag. This is something you should use if the internal downlaoder fails since ffmpeg is comparatively slow.

Config

When you start the program for the first time the config file gets created automatically

Places of the config:

  • Linux: ~/.config/anipy-cli/config.yaml
  • Windows: %USERPROFILE%/AppData/Local/anipy-cli/config.yaml
  • MacOS: ~/.config/anipy-cli/config.yaml

Sample Config

Attention Windows Users: If you activate the option reuse_mpv_window, you will have to donwload and put the mpv-2.dll in your path. To get it go look here: https://sourceforge.net/projects/mpv-player-windows/files/libmpv/

Usage

usage: anipy-cli [-D | -B | -H | -S | -M | --delete-history] [-q QUALITY] [-f] [-o] [-a] [-p {mpv,vlc,syncplay,mpvnet}] [-l LOCATION] [--mal-password MAL_PASSWORD] [-h] [-v] [--config-path]

Play Animes from gogoanime in local video-player or Download them.

Actions:
  Different Actions and Modes of anipy-cli (only pick one)

  -D, --download        Download mode. Download multiple episodes like so: first_number-second_number (e.g. 1-3)
  -B, --binge           Binge mode. Binge multiple episodes like so: first_number-second_number (e.g. 1-3)
  -H, --history         Show your history of watched anime
  -S, --seasonal        Seasonal Anime mode. Bulk download or binge watch newest episodes.
  -M, --my-anime-list   MyAnimeList mode. Similar to seasonal mode, but using MyAnimeList (requires MAL account credentials to be set in config).
  --delete-history      Delete your History.

Options:
  Options to change the behaviour of anipy-cli

  -q QUALITY, --quality QUALITY
                        Change the quality of the video, accepts: best, worst or 360, 480, 720 etc. Default: best
  -f, --ffmpeg          Use ffmpeg to download m3u8 playlists, may be more stable but is way slower than internal downloader
  -o, --no-seas-search  Turn off search in season. Disables prompting if GoGoAnime is to be searched for anime in specific season.
  -a, --auto-update     Automatically update and download all Anime in seasonals list from start EP to newest.
  -p {mpv,vlc,syncplay,mpvnet}, --optional-player {mpv,vlc,syncplay,mpvnet}
                        Override the player set in the config.
  -l LOCATION, --location LOCATION
                        Override all configured download locations
  --mal-password MAL_PASSWORD
                        Provide password for MAL login (overrides password set in config)

Info:
  Info about the current anipy-cli installation

  -h, --help            show this help message and exit
  -v, --version         show program's version number and exit
  --config-path         Print path to the config file.

What it can do

  • Faster than watching in the browser.
  • Play Animes in Your Local video player
  • Select a quality in which the video will be played/downloaded.
  • Download Animes
  • History of watched Episodes
  • Binge Mode to watch a range of episodes back-to-back.
  • Seasonal Mode to bulk download or binge watch the latest episodes of animes you pick
  • Configurable with config
  • (Optional) MAL Mode: Like seasonal mode, but uses your anime list at MyAnimeList.net
  • (Optional) Search GoGo for animes in specific seasons. Available for the download cli, seasonal mode and MAL mode. Turn it off with -o flag.
  • (Optional) Discord Presence for the anime you currently watch. This is off by default, activate it in the config (-c)
  • (Optional) Ffmpeg to download m3u8 playlists, may be more stable but is slower than internal downloader.

Libary Usage

Documentation can be found here

Important:

To import the libary, don't import anipy-cli, but anipy_cli (no '-' is allowed)

Advanced Usage Examples

Little example of using anipy-cli for automatically keeping anime library up-to-date:

# Cronjob runs every 2 minutes and checks wether anipy-cli is still running or not 
# (only run the job if last one is finished)

*/2 *   * * *   username        pidof -x anipy-cli || anipy-cli -Ma >> /var/log/anipy-cli.log

Other versions

Credits

Heavily inspired by https://github.com/pystardust/ani-cli/

All contributors for contributing

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

anipy_cli-2.7.21.tar.gz (47.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

anipy_cli-2.7.21-py3-none-any.whl (58.6 kB view details)

Uploaded Python 3

File details

Details for the file anipy_cli-2.7.21.tar.gz.

File metadata

  • Download URL: anipy_cli-2.7.21.tar.gz
  • Upload date:
  • Size: 47.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for anipy_cli-2.7.21.tar.gz
Algorithm Hash digest
SHA256 77efedbaa725e52f01c0ad6f27192e02a18912f87c3dc6457d25720526e497c3
MD5 567c0c750b42b5627adb9da17643945f
BLAKE2b-256 bdc6cf8b004e49528d3bb1bf5ea97c9415e64e9a5db25cd6431fe16b663e7823

See more details on using hashes here.

File details

Details for the file anipy_cli-2.7.21-py3-none-any.whl.

File metadata

  • Download URL: anipy_cli-2.7.21-py3-none-any.whl
  • Upload date:
  • Size: 58.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for anipy_cli-2.7.21-py3-none-any.whl
Algorithm Hash digest
SHA256 aca2a93e12b991e119e9472d2274fddeac58a2065b5f654dac4adcb62442c7c6
MD5 f448a959970c5d36ab3585488fe5d5f7
BLAKE2b-256 36166e806c5907354ff8602a7482bd631d93d21f29295c2a581e063001a57272

See more details on using hashes here.

Supported by

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