Skip to main content

A modern CLI to download animes automatically from Twist.moe

Project description

Kurby

PyPI - Python Version

Kirby ball in Kirby: Canvas Curse

Kurby is a nice and simple CLI that use Twist website, and their huge collection to download animes for free and automatically

Animes from Twist are generally in High Definition with English subtitles. Please consider donating for their amazing work :)

Overview

The CLI is built with Typer and it is composed of 3 commands

  • animes: Search animes to find what is available and extract the slug to be used in the other commands

animes

--search option allows you to make a fuzzy search

  • details: Show details of an anime if needed

details

You can see the number of episodes available and when the first and last episode were uploaded

  • download: Choose and download which episodes of the anime you want !

download

Because sometimes bad things can happen, Kurby will automatically retry for you

You can also download without having a slug initially. In this case, Kurby will propose you a selection

download-selection

And that's it !

You can also use python kurby.py --help to get more information on the different commands

Preinstallation

Installation

pip install kurby
kurby --help

Installation from sources

Create your virtual environment (optional)

mkvirtualenv kurby
workon kurby

Install poetry

curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -

Install dependencies using poetry

poetry install --no-dev
kurby-cli --help # or python kurby-cli --help

Getting the latest episode automatically

An interesting use case is to get the latest episode of an anime as soon as it is available.

This is possible on Linux using crontab (or another equivalent on others OS) and a little tweak of chemistry. Here is an example of a few instructions that can help you do this.

now=$(date -u "+%Y-%m-%dT%H:%M:%S")
date=$(cat kurby.date || echo $now) # Get the date of previous download
python kurby download {{YOUR_ANIME}} --dfrom=${DATE} # Download any episodes that has been uploaded since the last time
echo $now > kurby.date # Store the current date as the new date

Next steps

Kurby is already functional as it is but here are the next things I would like to add :

  • Adding the support of asynchronous download
  • Refactor the retrying strategy to add more customisable options and allow errors during a download without interruption
  • Refactor the crawling process to potentially avoid being detected as a bot

Disclaimer

Downloading copyright videos may be illegal in your country.

This tool is for educational purposes only.

The developers or this application do not store or distribute any files whatsoever.

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

kurby-0.0.2.tar.gz (11.7 kB view hashes)

Uploaded Source

Built Distribution

kurby-0.0.2-py3-none-any.whl (12.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