Skip to content

Repository files navigation

anime-sama-downloader

Tool to automaticly download multiple anumes episodes from websites, using anonymous web bots.

  • Can simultaneously download multiple episodes at the same time.

  • Handle striked episodes

  • Bypass Cloudflare anti-bot challenge (for now only checkboxes)

  • Use anonymous and secure ways to protect yourself. Includes protection to fingerprinting.

Also includes a console-lign client to select anime, season and episodes to download.

This project does not contains IA made code (except for the webpage visual, we are not CSS geniuses).

Important

This project is still in active development, it will change a lot, and some features might become broken at anytime. This tool does not contains copyrighted content nor endorse Copyright Infringement. Use it at your own risks.

Summary

  1. Dependencies

  2. How to install

  3. How to use

  4. Configuration

  5. Roadmap

Dependencies

Optional: episode segmentation module (segmentai)

Only required if you enable the "Segment episodes (MKV output)" option in the web settings. It detects the Opening/Ending and produces MKV files with chapters.

cd adapters/web/back/modules/segmentai
py -3.12 -m venv .venv
./.venv/Scripts/python.exe -m pip install torch torchaudio numpy --index-url https://download.pytorch.org/whl/cu124
./.venv/Scripts/python.exe -m pip install panns-inference

cu124 = CUDA 12.4 (GPU recommended); without a GPU, the default pip index works. On the first AI run, the model (~300 MB) is downloaded to ~/panns_data/.

How to install

Clone project

git clone https://github.com/Fire0902/anime-sama-downloader.git

To also fetch the optional segmentation module, clone with git clone --recurse-submodules ..., or initialize it afterwards with git submodule update --init. Without this step, the segmentation option simply stays hidden in the settings.

Install Dependencies

npm install

The project is now ready to use.

How To Use

Using Console-Lign Interface

Launch a terminal, then start the main interface:

cd ~/anime-sama-downloader
npm run start:cli

Using Auto-Download with JSON

You can also start a automatic download by creating a JSON file at ~/anime-sama-downloader/json/animes.json

Name it 'animes.json' or it will not work. Here is an example of a file:

{
	"One Piece": {
		"_comment": "url is optionnal it's only use to make sure the app find the good one",
		"url": "https://anime-sama.org/catalogue/one-piece/",
		"_comment1": "if seasons = ALL episodes is useless else episodes is required else seasons format is 1-N | 1,5,7 | 6, just in case first season is 1 not 0",
		"seasons": "1-4",
		"_comment2": "episodes format is 1-N | 1 | 1,5,7,19 | ALL",
		"episodes": "ALL"
	},
	"Vinland Saga": {
		"url": "",
		"seasons": "ALL",
		"episodes": ""
	},
	"One Punch Man": {
		"url": "",
		"seasons": "3",
		"episodes": "ALL"
	}
}

A JSON template file is also available at ~/anime-sama-downloader/json.

To start auto-download:

cd ~/anime-sama-downloader
npm run start:download

f

Configuration

Project should be ready to work, but you can change tool parameters values at ~/anime-sama-downloader/engine/config/Config.ts.

Be warned that modify it might breaks correct process.

Additionnaly, some folders can be created while using tools, like logs/, or screenshots/ if you activate it in config. Those files are generated only, and can be deleted at anytime. It will not affect tool process at all.

Roadmap

We are currently planning to transform this project into an API, by merging it to adonis framework.

We are also working on a website as an alternative to select animes of your choice.

Future

Features Refactors Bugfixes
Show progress Mo instead of timestamp [IMPORTANT] Refactor EpisodeDownloader Multibar progress display
Jellyfin extension to call API Split Cli.run process to multiple methods FileReader runs infinitly with \n

| | Self-hosted web version | [Final goal] Implements an API

Previously finished

Features Refactors Bugfixes
CloudFlare anti-bot detection Convert tool to TypeScript Downloads stop at 2 eps
Handle striked episode Reorganise project architecture
Logger for engine & CLI Remove duplicate in FileReader & UrlBuilder
Inquirer lib for better CLI inputs
waitForSelector with puppeteer lib
Links cache and SQLite Database

About

cli that allow you to download anime sama episodes in js

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages