Giter VIP home page Giter VIP logo

kurby's Introduction

Kurby

PyPI - Python Version Downloads PyPI 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 kurby --help to get more information on the different commands

Installation

pip install kurby
kurby --help

Installation on Windows

  • Right click on the install.bat and run it as an Administrator, this will install Chocolatey who will manage the python installation
  • Once the installation is finished, and you're asked to press a key, open a new terminal (Win + R > cmd )
  • You can now start using Kurby with kurby --help

Installation on Android without root needed

  • Install Termux on your Android phone
  • In Termux, run this command to allow access to storage: termux-setup-storage, and tap allow
  • Next, run the follow command pkg install git python
  • Then pip3 install kurby
  • You're done ! You can download animes on your phone like so kurby download --d ~/storage/shared
Thanks to 6b86b3ac03c167320d93 for this tutorial

Installation from sources

Create your virtual environment (optional)

mkvirtualenv kurby
workon kurby

Install poetry

curl -sSL https://install.python-poetry.org | python3 -

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.

kurby's People

Contributors

aberrier avatar sirobby avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

kurby's Issues

Getting an error while downloading

Hello! I'm constantly getting this error while downloading any anime::

Retrying kurby.helpers.download_source in 10.886510581867924 seconds as it raised ReadError: [WinError 10054]

Is there a way to fix it?

Kurby error when running.

I get the following error when running

% kurby animes --search "(anime name)"
Error server_error: Twist didn't respond correctly. You might need to try again later.
[Errno -5] No address associated with hostname

Could there be be a mistype in the codebase or something? Maybe something is outdated now?

(running via anaconda by conda create -n conda python=3.9, I can PR this part to README if you want)

silent mode

for cronjobs and scripts it'd be nice to have a silent mode when downloading episodes

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.