Skip to main content

CLI Tool/Client Library for

Project description

Twist.Moe Downloader Helper


Build Status Downloads PyPI version

This is a python cli tool and client for downloading video contents of series available on the website locally. To download a particular series, search for a series by entering a part of its name like twistdl fate or alternatively use the series's url string directly i.e. twistdl

Additional to the commandline interface, this package also provides a small python object oriented api for

Remember to support with donations if you can, as they do a great job of operating their site!


The scripts has been tested against python 2.7 and 3.7.

pip install twistdl --user

And you're done! You can started with something as simple as the command below.

$ twistdl fate

Running the script

$ twistdl

usage: twistdl [title] [--range RANGE][--directory DIRECTORY] [-h]

Twist-dl is a small python tool for downloading video contents of series
available on the website locally! To download a list of particular
series, enter a keyword of the series name. i.e. 'code geass' can be found by
simply entering 'code'.

positional arguments:
  title                 To download a particular series, use the series's url
                        like so "" and to
                        search for a series enter a part of its name as found
                        in a's url string like "fate".

optional arguments:
  -h, --help            show this help message and exit
  --directory DIRECTORY
                        Directory path to save downloaded contents
  --range RANGE         Range of episodes to download. i.e. --range=1-24 or
                        for a single episode --range=1

Example Usage:

Search and download with CLI

Download by passing the series title as found from search. Not specifying a range with --range will prompt you with to a enter range. If no range is entrered all episodes will be downloaded.

$ twistdl code
? Anime(s) found. Please choose a series to download:  Code Geass: Hangyaku no Lelouch R2
Episode selection between 1-25. To download a range enter "1-5", for a single episode enter "5" or leave it empty press "Enter" to download all episodes.
Input: 1-5
anime/code-geass-hangyaku-no-lelouch-r2/Code Geass: Hangyaku no Lelouch R2 - 01.mp4:   6%|| 30/478 [00:12<03:13,  2.32MB/s]

Search and download with API

from pathlib import Path
from twistdl import TwistDL

# Credentials can be supplied incase they expire. (good luck acquiring them though....)
client = TwistDL()
animes = client.search_animes(title='code geass')

for anime in animes:
    for episode in anime.episodes:
        file = Path(f'anime/{anime.slug_name}/{anime.title} - {episode.number}')
        print(f'{anime.title} - {episode.number}')
        file.parent.mkdir(exist_ok=True, parents=True)

Downloading copyright videos may be illegal in your country. This tool is for educational purposes only. Upstream changes to can and will break functionality of this tool at some point.

Project details

Download files

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

Files for twistdl, version 1.3
Filename, size File type Python version Upload date Hashes
Filename, size twistdl-1.3.tar.gz (9.5 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page