• 欢迎访问爱玩吧
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏爱玩吧

[教程]Torrench:一个命令行BT种子搜索工具,可直接下载资源

实用教程 aiwanyule 3年前 (2021-05-12) 已收录
文章目录[隐藏]

说明:前几天博主分享过一个命令行搜索BT磁力的教程,查看:使用torrent-cli命令行获取电影BT磁力,不过好像功能比较单一,只有搜索功能,今天再分享个命令行BT种子搜索工具Torrench,该工具不仅可以搜索BT种子,还可以将种子传输到transmissiondelugeqBittorrent客户端进行下载,还支持多个站点搜索,比较强大。

安装

Github地址:https://github.com/kryptxy/torrench
系统要求:WindowsLinuxMacOs,这里就说下Linux VPS安装,建议使用CentOS系统。

1、安装Python3
一般大多数Ubuntu自带Python3,而CentosDebian就需要我们安装了。

#查看是否有Python3
python3 -V

#安装Python3
#CentOS系统
wget https://www.moerats.com/usr/shell/Python3/CentOS_Python3.6.sh && sh CentOS_Python3.6.sh
#Debian系统
wget https://www.moerats.com/usr/shell/Python3/Debian_Python3.6.sh && sh Debian_Python3.6.sh

然后再输入python3 -V看是否安装成功。

2、安装Torrench
官方说了pip和源码安装两种方法,博主感觉pip安装好像容易出问题,所以这里只说源码安装。

#CentOS系统
yum install git -y
#Ubuntu和Debian系统
apt-get install git -y

#下载源码并安装
git clone https://github.com/kryptxy/torrench.git
cd torrench
pip3 install -r requirements.txt
python3 setup.py install

安装wcwidth使其支持中日韩文:

pip3 install wcwidth

配置

如果想要使用更多功能就需要配置文件。只是想简单的使用搜索功能,那这步可以跳过。

1、配置多站点搜索

#下载config.ini并配置
cd /root/torrench
wget -O config.ini https://pastebin.com/raw/reymRHSL
sed -i 's/enable = 0/enable = 1/g' '/root/torrench/config.ini'
#复制配置文件
cp /root/torrench/config.ini /root/.config/torrench
#更新配置文件
torrench -U

2、添加到客户端下载
本配置可以将你搜索的BT种子直接添加到客户端进行下载,编辑torrench.ini文件

nano /root/.config/torrench/torrench.ini

修改如下信息:

#CLIENT为BT客户端类型,支持transmission-qt、deluge、qBittorrent、rtorrent、transmission-remote、transmission-gtk,这里博主建议使用rtorrent客户端,当然你会用其它的也可以自己修改
CLIENT = rtorrent
#下面参数为服务器和端口,默认localhost:9091,客户端填了rtorrent后,以下参数不用管
SERVER = 
PORT =

接下来需要在服务器上安装rtorrent

#CentOS系统
yum install rtorrent -y  

#Debian/Ubuntu系统
apt-get update -y
apt-get install rtorrent -y 

使用

1、基本命令

torrench 参数 搜索名称

参数介绍:

#由于部分站点关闭,跨站点不能用,只说下简单参数
可选参数:
    -h, --help            显示帮助并退出
    -v, --version         显示版本并退出
    -U, --update-config   更新config.ini文件
    -p, --page-limit      搜索页数

可选BT站点参数:需要config.ini(默认禁用)    
    -t, --thepiratebay
    -k, --kickasstorrent
    -x, --x1337
    -r, --rarbg
    -n, --nyaa
    -l, --limetorrents
    -i, --idope
    -b, --xbit

2、示例命令

#在idope站点搜索逃学威龙,且默认搜索第一页,如果运行命令出错或者无搜索结果,请换个站点搜索
torrench -i "逃学威龙"

#如果搜索多页,比如搜索2页的资源
torrench -i "逃学威龙" -p 2

搜索演示:

[root@rats ~]# torrench -i "逃学威龙"

[Idope]

Fetching from page: 1
[in 0.90 sec]

+--------------------------------------------------------------------------------------------------+---------+----------+---------+----------+
| NAME                                                                                             | INDEX   | SIZE     |   SEEDS | AGE      |
+==================================================================================================+=========+==========+=========+==========+
| [逃学威龙2].Fight.Back.to.School.II.1992.DVDRip.X264                                             | --1--   | 1.8 GB   |     112 | 9 months |
+--------------------------------------------------------------------------------------------------+---------+----------+---------+----------+
| [2015.04.19]逃学威龙2[1992年中国香港喜剧(BD)][国粤双语]                                          | --2--   | 4.9 GB   |      25 | 1 years  |
+--------------------------------------------------------------------------------------------------+---------+----------+---------+----------+
| 逃学威龙I II III合集.D9终极收藏.1991-1993                                                        | --3--   | 5.0 GB   |      22 | 1 years  |
+--------------------------------------------------------------------------------------------------+---------+----------+---------+----------+
| [2009.10.01]逃学威龙II[1992年中国香港喜剧动作][国语]                                             | --4--   | 570.8 MB |      16 | 5 months |
+--------------------------------------------------------------------------------------------------+---------+----------+---------+----------+
| 逃学威龙1 粤语版[周星驰 吴孟达]_超清.kux                                                         | --5--   | 885.5 MB |      11 | 1 years  |
+--------------------------------------------------------------------------------------------------+---------+----------+---------+----------+
| 逃学威龙1-3.Fight.Back.to.School.1991-1993.BD720P.X264.AAC.Cantonese&Mandarin.CHS.Mp4Ba          | --6--   | 6.8 GB   |       8 | 1 years  |
+--------------------------------------------------------------------------------------------------+---------+----------+---------+----------+
| 逃学威龙ⅠⅡⅢ合集.1991-1993.国粤双语.中文字幕                                                   | --7--   | 8.6 GB   |       6 | 1 years  |
+--------------------------------------------------------------------------------------------------+---------+----------+---------+----------+
| 逃学威龙3之龙过鸡年.国粤双语中字.Fight.Back.to.School.III.1993.BD720P.X264.AAC.2Audios.CHS-882FX | --8--   | 2.6 GB   |       5 | 4 months |
+--------------------------------------------------------------------------------------------------+---------+----------+---------+----------+
| 逃学威龙1-3【国语中文字幕】                                                                      | --9--   | 1.2 GB   |       4 | 7 months |
+--------------------------------------------------------------------------------------------------+---------+----------+---------+----------+
| 逃学威龙1-3【粤语中文字幕】                                                                      | --10--  | 1.2 GB   |       3 | 1 years  |
+--------------------------------------------------------------------------------------------------+---------+----------+---------+----------+

Total 10 torrents [1 pages]
Total time: 0.90 sec

Enter torrent's INDEX value

(q = quit)
(r = return)
index > 1  #输入数字进行选择

Selected index [1] - [逃学威龙2].Fight.Back.to.School.II.1992.DVDRip.X264

[1] Print links (magnetic, upstream)
[2] Load torrent to client
---
[r] Return
[q] Quit

Option > 2  #1是将磁力和链接地址打印到SSH客户端,2是直接将种子添加到客户端下载

(rtorrent)
Success (PID: 13817)

#使用Ctrl+C退出,下载的文件在/root文件夹

这里使用方法就简单的说这些,更多的使用请查看Github项目地址


爱玩吧 , 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:[教程]Torrench:一个命令行BT种子搜索工具,可直接下载资源
喜欢 (0)