Code Monkey home page Code Monkey logo

torrench's Introduction

Torrench - Command-line torrent search tool

Build Status GitHub release PyPI AUR PyPI Dependency Status Say Thanks


mix (Click to expand) (More samples)


About

Torrench is a command-line program to search and download torrents from torrent-hosting sites. It's compatible under Windows, Linux and MacOS.

Following websites are supported:

  • linuxtracker.org - Download linux distros ISO torrents.
  • DistroWatch - Another linux distro ISOs repository.
  • The Pirate Bay (TPB)*
  • KickassTorrents (KAT)*
  • SkyTorrents *
  • Nyaa[.]si *
  • XBit[.]pw *
  • More to come...

I have tested it on following platforms (and it works great):

  • Windows: Win7 (32bit, 64bit), Win8, Win8.1, Win10.
  • Linux: Debian/Ubuntu, Fedora, Arch

[Reported by users]

  • MacOS: Yosemite, Sierra (10.12.6). [I do not own a Mac hardware, so unable to test it myself. If you find it working on your system (it should), update me?]

IMPORTANT - Please keep a close eye on CHANGELOGS. All updates info, addition setup info (whenever required), and everyting else related will be updated there.


* Using TPB/KAT/SkyT/Nyaa/XBit

By default, searching thepiratebay(TPB)/kickasstorrents(KAT)/SkyTorrents/Nyaa (anime)/XBit from torrench is disabled. The user should configure and enable it to use. I have provided configuration steps, but before moving to configuration, please note the following:

  • Using these sites in many countries is illegal. Using them can get you into un-intended troubles (e.g notices/block from ISP). Read Legal issues
  • Neither I, nor the tool shall be held responsible for any action taken against you for using the above-mentioned sites from torrench.
  • Illegal searches examples
  • Configuration instructions if you decided to them.

Torrench initially began as a python learning project for me. I am sure there are ways to implement code I wrote in a much better/efficient way. Do let me know. Alternatively, you can also send a pull request. See Contributing.


Installation/Building from Source

Linux

  • Requires Python3
  • Arch Users - Can install from AUR
  • Other distro users [Ubuntu,Fedora,Suse,etc...] can use pip (python3-pip) (install/upgrade)
$ sudo python3 -m pip install --upgrade torrench
## OR
$ sudo pip3 install --upgrade torrench
  • Alternatively, build from source (python-setuptools)
$ sudo python3 setup.py install

Windows

Windows does not require any additional packages. Everything required to run this software is provided in executable (Does not even require python pre-installed).

  • Download latest torrench executable

  • That's it. Run using cmd/powershell [> torrench.exe <search>]

    • NOTE:
      • In windows, the default location for storing [TPB] html files is C:\Users\<user>\.torrench\temp

Osx

Please note OSX requires to install package pyopenssl:

pip install pyopenssl

Configuration instructions:

  1. Download config.ini from Sync / TinyUpload
    • Windows - Copy the config file in C:\Users\<user>\.config\torrench\ (create any missing directories)
    • Linux - Default location is $XDG_CONFIG_HOME/torrench/. If $XDG_CONFIG_HOME is not defined, it fallbacks to $HOME/.config/torrench/ (Create any missing directories).
    • MacOS - Next bullet (setup instructions).
  2. Enable it
    • Open config.ini file
    • Set enable=1
    • Save and exit
  3. That's it.

Config file minimal setup guide (Windows/Linux/MacOS)


Usage

$ torrench SEARCH_STRING  ## Search linuxtracker
$ torrench -d SEARCH_STRING ## Search distrowatch
$ torrench [Options] <SEARCH_STRING>

Options

    positional arguments:
      search                Enter search string

    optional arguments:
      -h, --help            show this help message and exit
      -d, --distrowatch     Search distrowatch
      -t, --thepiratebay    Search thepiratebay (TPB)
      -k, --kickasstorrent  Search KickassTorrent (KAT)
      -s, --skytorrents     Search SkyTorrents
      -n, --nyaa            Search Nyaa
      -x, --xbit            Search XBit.pw
      --top                 Get top torrents [TPB/SkyTorrents]
      --copy                Copy magnetic link to clipboard
      -p LIMIT, --page-limit LIMIT
                            Number of pages to fetch results from (1 page = 30 results).
                            [default: 1] [TPB/KAT/SkyTorrents]
      -c, --clear-html      Clear all [TPB] torrent description HTML files and exit.
      -v, --version         Display version and exit.

Features

  • Supports all *nix distros
  • Displays results in organized, tabular form.
  • Add torrent directly to client from torrench. See HERE for more.
  • Copy magnetic link to clipboard (--copy)
  • [linuxtracker] Supports filtering search using categories.
  • Interactive mode for searching across modules

[TPB/KAT]

  • Surf torrents Ad-free
  • Fetch Torrents on basis of pages [1 page = 30 results (max)] [(-p) argument].
  • Display colored results on basis of uploader's status (Very useful when choosing torrent).
    • TPB:
      • VIP Uploaders [results in green]
      • Trusted Uploader [results in magenta]
      • General Uploader
    • KAT (KickassTorrents):
      • Verified uploaders [Uploader's text in yellow]
      • Seeds [in green]
      • Leeches [in red]
  • Add torrent directly to torrent client through magnetic links without opening/fetching details.
  • Get upstream link which can be opened using browser.

[TPB-Only]

  • Get complete torrent details (Description, comments, torrent download). Torrent details are available in dynamically-generated HTML pages.
  • Fetch Comments on basis of pages [Useful when torrent has large number of comments, and not all comments are intended to be fetched].
  • Get TPB Top Torrents (--top)

Note

  • A torrent might take long to fetch results. I have generally faced this issue when running torrench for the first time. When this happens:
    • Abort the ongoing search [Ctrl+C]
    • Search again. The second time generally works fine.
  • KAT Proxy is quite shaky, and might not work at all times. I have been unable to find any reliable KAT proxy. If you know of some working proxy, you can edit KAT_URL in config.ini with that working proxy. Alternatively, use TPB or SkyTorrents. They are pretty reliable and works most of the time.

Samples

(It might be possible that samples look a little diff. from present torrench UI. There shouldn't and won't be any major difference though. I will update samples when there is any major change in UI/display.).

$ torrench "ubuntu desktop 16.04"	## Search Linuxtracker for Ubuntu Desktop 16.04 distro ISO
$ torrench "fedora workstation"	## Search for Fedora Workstation distro ISO
$ torrench -d "opensuse" ## Search distrowatch for opensuse ISO
$ torrench -d "solus" ## Search distrowatch for solus ISO
$ torrench -x "fedora" ## Search XBit for fedora distros ISO

Linuxtracker

ubuntu fedora

DistroWatch

distrowatch distrowatch

XBit[.]pw

xbit xbit


Searches considered illegal

TPB Examples

$ torrench -t "suicide squad"	## Search suicide squad TPB
$ torrench -t "game of thrones s07e02" -p 2	## Search and fetch 2 pages TPB for GOT s07e02

illegal

illegal (Dynamically-generated Torrent description HTML page)

illegal (Click to expand)

KAT Examples

$ torrench -k "doctor strange"
$ torrench -k "guardians of the galaxy"

illegal

illegal (Click to expand)

SkyTorrents Examples

$ torrench -s "hannibal"
$ torrench -s "narcos"

illegal

illegal (Click to expand)

Nyaa[.]si Examples

$ torrench -n "naruto"

illegal

illegal


Disclaimer

This tool fetches torrent and details from already existing torrent website(s). I do not take any responsibility for availability of any kind of torrent data, or/and hosting of any torrent website(s). Also, I am not responsible for closing of any of the torrent website(s). As long as the website(s) (proxies) are available, data will be fetched.

Contributing (Bug reports/suggestions/feedbacks)

Please see CONTRIBUTING

Contact

Thank you

  • Contributors for giving your time to this project and improving it.
  • Users for your valuable feedback and suggestions.
  • MacOS testers for testing torrench and reporting.

Licence

Copyright (C) 2017 Rijul Gulati <[email protected]>

Torrench is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Torrench is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Torrench.  If not, see <http://www.gnu.org/licenses/>.

torrench's People

Contributors

arount avatar ecapson avatar itdaniher avatar jaymoulin avatar rajukshetrimayum avatar ricky-wilson avatar

Watchers

 avatar

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.