Coder Social home page Coder Social logo

cli-torrent-dl-windows-wsl2's Introduction

CLI Torrent Downloader

About

CLI Torrent Downloader provides convenient and quick way to search torrent
magnet links (and to run associated torrent client) via major torrent sites (ThePirateBay, LimeTorrents, Zooqle, 1337x, GloTorrents, KickAssTorrents, SolidTorrents, BTDB, TGx, Nyaa by default) through command line.

Prerequisites

  • Python 3.8+

Installation

$ ./setup.sh

Config

Edit ~/.config/torrentdl/config.json to customize your preferred torrent client and browser (default is qbittorent and firefox).

Docker

Opening magnet links in your preferred torrent client will not work, of course.

Build

$ docker build . -t tordl

Run JSON RPC Server

$ docker run -p 57000:57000 -it tordl -s

Usage

CLI Usage

Run search from command line:

$ tordl debian 8

Exclude search results containing user defined strings:

$ tordl debian ::-8 ::-7 (...)

Show help:

$ tordl -h

Browse Mode Usage

  • KEY_DOWN, KEY_UP, PAGE_UP, PAGE_DOWN - Navigate
  • ENTER - Run torrent client
  • SPACE - Open torrent info URL in browser
  • ESC - exit
  • / - Search
  • a - Sort by source (torrent search engine)
  • s - Sort by seeds (default)
  • d - Sort by leechers
  • f - Sort by size
  • m - Load more search results (if possible)
  • p - Search engines selection

Browse Mode Search Usage

  • KEY_UP - Move to previous in search history
  • KEY_DOWN - Move to next in search history
  • ENTER - Search
  • ESC - Exit search

Browse Mode Search Engine Selection Usage

  • KEY_UP, KEY_DOWN - Navigate
  • ENTER, SPACE - Check / Uncheck selected search engine
  • ESC - Save and exit engine selection
  • BUTTON_OK - Save and exit engine selection
  • BUTTON_SAVE - Persist selection in config and exit engine selection

Test Mode

Run with -t or --test-search-engines to test if all search engines are functioning. Consider using --test-all to test all search engines, not only those set up in config.

API Mode

Run with -a or --api. In this mode, just print the search result in JSON format to the standard output and exit. Consider using -m or --fetch-missing-magnet-links in this mode.

RPC Server

Run with -s or --rpc-server to start RPC Server, see config or -hfor settings details. Consider using -m or --fetch-missing-magnet-links in this mode. JSON RPC Server follow jsonrpc 2.0 standard. Currently, there is only one RPC method search which expects array of one argument - the search term.

RPC Client

Run with -q or --rpc-client, see -h for setting connection details.

Iam feeling lucky mode

Directly downloads and opens torrent client with magnet link from first search result. Run with -d or --download.

JSON Output Format

{
    "result": [
        {
            "name": "Debian 8 7 1 Jessie x64 x86 64 DVD1 ISO Uzerus",
            "links": [
                "https://kickasss.to/debian-8-7-1-jessie-x64-x86_64-dvd1-iso-uzerus-t2086014.html"
            ],
            "magnet_url": "magnet:?xt=urn:btih:40F90995A1C16A1BF454D09907F57700F3E8BD64...",
            "origins": [
                "KAT"
            ],
            "seeds": 2,
            "leeches": 0,
            "size": "3.7GB"
        },
        ...,
        ...,
        ...
}

Creating own search engine extensions

See ~/.config/torrentdl/engines.py and ~/.config/torrentdl/config.json#search_engines.

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.