在 Linux 中从命令行搜索 Torrent

尽管互联网上有大量的 GUI Torrent 应用程序,但一些用户仍然更喜欢使用命令行 Torrent 工具。 如果你是他们中的一员,我有一个好消息要告诉你。 见面 我们得到,一个使用 Python 编程语言编写的命令行种子搜索工具。 它可以帮助您在不离开终端的情况下搜索 torrent 文件。 We-get 是一个跨平台的工具,所以它适用于 GNU/Linux、MS Windows 和 Mac OS X。在这个简短的教程中,让我们看看如何安装和使用 We-get 工具从命令行搜索种子Linux 和类 Unix 系统。

在 Linux 中安装 we-get

We-get 需要 Python 3.5 或更高版本才能工作。 Ubuntu 16.04 LTS 和更高版本预装了 Python 3 和 Python 2。 因此,如果您使用 Ubuntu 16.04 或更高版本,则不必安装 Python。 您需要安装 PIP,Python 包管理器,才能安装 We-get。

为此,请运行:

$ sudo apt-get install python3-pip

在 RHEL、CentOS 等基于 RPM 的系统上,您需要安装 Python 3.x 版本,如下所示。

$ yum install https://centos7.iuscommunity.org/ius-release.rpm
$ yum install python35u

安装 Python 3.5 后,对 PIP 运行以下命令:

$ yum install python35u-pip

另外,请确保您已在系统上安装了 GIT。 Git 在大多数 Linux 发行版的默认存储库中都可用,因此我们可以使用默认包管理器安装它,如下所示。

在基于 DEB 的系统上:

$ sudo apt-get install git

在基于 RPM 的系统上:

$ sudo yum install git

在 Arch Linux 及其衍生产品上:

$ sudo pacman -S git

安装 Pip 和 Git 后,运行以下命令安装“we-get”。

$ sudo pip install git+https://github.com/rachmadaniHaryono/we-get

下载免费电子书:“要学习的最佳 Web 编程语言”

在 Linux 中从命令行搜索 Torrent

We-get 目前支持以下四个网站。

  • 1337x
  • 海盗湾
  • 央视
  • yts
  • 更多尚未到来

让我们看一些实际的例子。

免责声明: 在某些地区/国家搜索/下载种子文件是非法的。 请自行承担使用此信息的风险。 我们(OSTechNix 或作者)不对任何非法使用种子负责。

要搜索 torrent,请运行:

$ we-get --search "Arch Linux" --target the_pirate_bay

样本输出:

# Fetching data from 'the_pirate_bay' ...
the_pirate_bay Arch.Linux.Environment.Setup.How-to [2/0]
the_pirate_bay Raspberry.Pi.Arch.Linux.ARM [1/0]
the_pirate_bay Arch.Linux.2016-07-01.ISO [1/1]
the_pirate_bay Arch.Linux.Netinstall.Image.Dual.Architecture [0/0]
the_pirate_bay Arch.Linux.Live.ISO [0/1]
the_pirate_bay arch.linux [0/1]
the_pirate_bay Arch.Linux.Netinstall.Image.32-bit [0/0]
we-get >

您可以查看上述搜索词(即 Arch Linux)的可用种子列表。 为此,只需键入 列表 在我们得到提示。 此外,要查看特定种子的详细信息,请键入 显示 如下所示。

we-get > show Arch.Linux.Environment.Setup.How-to
Arch.Linux.Environment.Setup.How-to {
 "leeches": "0",
 "link": "magnet:?xt=urn:btih:3b2a9431310ad4de48b55bf3b219d43820a021b1&dn=Arch+Linux+Environment+Setup+How-to&tr=udp%3A%2F%2Ftracker.leechers-paradise.org%3A6969&tr=udp%3A%2F%2Fzer0day.ch%3A1337&tr=udp%3A%2F%2Fopen.demonii.com%3A1337&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969&tr=udp%3A%2F%2Fexodus.desync.com%3A6969",
 "seeds": "2",
 "target": "the_pirate_bay"
}

要退出 We-get shell,请输入 出口.

这是 We-get 支持的选项的完整列表。

$ we-get -h
Usage: we-get [options]...

Options:
 -s --search [text] Search for a torrent.
 -l --list List top torrents from modules.
 -t --target [target] Select module to use or 'all'.
 -L --links Output results as links.
 -J --json Output results in JSON format.
 -G --get-list List targets (supported web-sites).
 -f --filter [str] Match text or regular expression in the torrent name.
 -n --results [n] Number of results to retrieve.
 -S --sort-type [type] Sort torrents by name/seeds (default: seeds).

Video options:
 -q --quality [q] Try to match quality for the torrent (720p,1080p, ...).
 -g --genre [g] Try to select video genre for the torrent (action, comedy, etc..).

General options:
 -h --help Help message.
 -v --version Show version.

Copyright (c) 2016-2017 Levi Sabah <[email protected]>.
Full documentation at: <https://github.com/levisabah/we-get>

资源:

建议阅读:

  • 如何从终端搜索网络