Torrench - Command-line torrent search tool
Torrench is a command-line program to search and download torrents from torrent-hosting sites. It's compatible under Linux and Windows operating systems.
- MacOS Users: I don't own a Mac hardware, so unable to test on it. But, I think it should work fine, considering the code is written keeping cross-platform in mind. Try and report back maybe? Thanks.
Torrents can be fetched from following websites:
- linuxtracker.org - Download linux distros ISO torrents.
- DistroWatch - Another linux distro ISOs repository.
- The Pirate Bay (TPB)*
- KickassTorrents (KAT)*
- More to come...
* Using ThepirateBay(TPB) / KickassTorrents(KAT)
By default, searching thepiratebay(TPB)/kickasstorrents(KAT) 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 TPB in many countries is illegal. Using TPB 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 TPB from torrench.
- Illegal searches example
- This should be enough. Please see Configuration steps to enable TPB.
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 or Open issue if you come across any. Alternatively, you can also send a pull request.
I believe this project can go a long way. I'll need your help expanding it, and keeping it active. Suggestions/Feedbacks are highly appreciated. (I'll soon upload the contributions how-to)
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)
sudo python3 -m pip install 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 torrench executable
-
That's it. Run using cmd/powershell [
> torrench.exe <search>
]- NOTE:
- In windows, the default location for storing html files is
C:\Users\<user>\.torrench\temp
- In windows, the default location for storing html files is
- NOTE:
Configuration instructions:
- Download config.ini file (Hosted on sync)
- Windows - Copy the config file in
C:\Users\<user>\.config\torrench\
(create any missing directories) - Linux - Copy the config file to
$HOME/.config/torrench/
(Create any missing directories)
- Windows - Copy the config file in
- Enable it
- Open config.ini file
- Set
enable=1
- Save and exit
- That's it.
Usage
$ torrench SEARCH_STRING ## Search linuxtracker
$ torrench -d SEARCH_STRING ## Search distrowatch
$ torrench [Options] <SEARCH_STRING>
Options
-h, --help show this help message and exit
-d, --distrowatch Search distrowatch
-t, --thepiratebay Search thepiratebay
-k, --kickasstorrent Search KickassTorrent (KAT)
-p LIMIT, --page-limit LIMIT
Number of pages to fetch results from (1 page = 30 results). [default: 1] [TPB]
-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.
- [linuxtracker] Supports filtering search using categories
[Common to both 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 [text 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.
ThepirateBay Features
-
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].
KickassTorrents Features
- Get upstream [KAT] link which can be opened using browser.
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.
Examples
$ 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
Linuxtracker
DistroWatch
Searches considered illegal
ThePirateBay (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
(Dynamically-generated Torrent description HTML page)
KickAssTorrents (Examples)
$ torrench -k "doctor strange"
$ torrench -k "guardians of the galaxy"
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.
Bug Report and/or Feedback
Found a bug? Please report and help improving this tool. You can Open Issue or contact me directly. Feedbacks/Suggestions are much appreciated. They help in improving the tool, and keep me motivated.
Contact
E-mail : [email protected]
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/>.