The project is in a healthy, maintained state
A robust command-line tool that automates extracting direct download links and saving files from leechtop.com. Supports batch processing, duplicate skipping, and safe concurrency.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 3.13
~> 1.86
~> 0.22
~> 0.6
~> 0.19
~> 3.26
~> 0.9

Runtime

~> 3.0
~> 5.0
~> 2.0
~> 1.0
~> 1.0
 Project Readme

Leechtop Downloader

A CLI utility for downloading files from leechtop.com.

Installation

To install the gem globally, run:

gem install leechtop_downloader

This will make the leechtop command available in your terminal.

Development

Ruby >= 3.3 is required; development uses the Ruby in .ruby-version.

bundle install
git config core.hooksPath .githooks   # optional: run the fast gates before every commit
script/check                          # every check CI runs (see below)

The project tolerates no warnings and no suppressions. script/check runs every check of CI locally: RSpec with Ruby warnings enabled (any warning fails the run), 100% line and branch coverage and no real network access; the original spec suite of main; RuboCop with every cop enabled; Sorbet at typed: strict; YARD (100% documented); Reek, Flay, Flog and Debride; bundler-audit; mutation testing (every mutation must be killed); and the linters of the workflows, shell scripts, YAML, Markdown, TOML, spelling, EditorConfig and secrets. See CONTRIBUTING.md for the complete list of gates.

Usage

The CLI can download files from direct leechtop.com links or automatically extract and download multiple links from any generic HTML webpage. All downloads are saved in the current folder by default, which can be overridden via the --destination option.

Direct Download

Provide a direct Leechtop URL:

leechtop download "https://leechtop.com/example1"

Batch Download via HTML Parsing

Provide the URL of an HTML page (like a manga chapter index) containing leechtop.com links. The tool will parse the page, extract all valid links, and download them sequentially:

leechtop download "https://dl-raw.ac/example-manga-page/"

Multiple URLs

You can pass any combination of direct URLs or generic HTML pages at once:

leechtop download "https://leechtop.com/example1" "https://dl-raw.ac/example-page/"

A URL that fails (a page that does not load, a file that was deleted) is reported, and the remaining URLs are still downloaded.

Batch Download via Text File

You can also pass the path to a local text file (UTF-8) that contains a list of URLs, one per line. The tool will read the file and download each link:

# links.txt contains URLs separated by newlines
leechtop download links.txt

Parallel & Concurrent Downloading

Since leechtop.com does not allow parallel downloads, the tool enforces a strict global application lock. If you attempt to run multiple instances of the downloader concurrently in different terminal tabs, any secondary instances will automatically detect the active process, print an error message, and safely exit to prevent conflicts.

Options

--skip-existing (Default: true) By default, the tool skips downloading files that already exist in the destination directory. To download them again, pass --no-skip-existing; existing files are never overwritten, the new download is saved with a numeric suffix (file_1.zip, file_2.zip, ...):

leechtop download "https://leechtop.com/example1" --no-skip-existing

--destination (Default: .) Specify a custom destination directory for downloaded files:

leechtop download "https://leechtop.com/example1" --destination="/path/to/custom/dir"

File names sent by the server are always saved inside the destination directory: path separators in a name are replaced with _.