零点资源网

零点资源博客,繁华落尽,自拾凄凉,无数与岁月重复粘贴的生活,一如既往。

Linux VPS使用torrent-cli命令行获取电影等资源的BT磁力

说明:我们很多人找小电影的都习惯百度,但这个方法似乎没什么逼格,对于手上有很多VPS的来说,找资源这种事,可以不用像普通老百姓一样打开百度盲目查找了!这里分享个磁力爬虫工具,可以帮你完成查找磁力的工作。

安装

Github地址:https://github.com/chenjiandongx/torrent-cli
系统要求: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、安装torrent-cli
这里安装方法有2种。
pip安装:

pip3 install torrent-cli 

源码安装:

#可以修改torrent.py文件来增加所爬的磁力站 git clone https://github.com/chenjiandongx/torrent-cli.git cd torrent-cli pip3 install -r requirements.txt python3 setup.py install

提示-bash: git: command not found的使用命令:

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

使用

1、使用命令:

usage: torrent-cli [-h] [-k KEYWORD] [-n NUM] [-s SORT_BY] [-o OUTPUT] [-p]                    [-v]  Magnets-Getter CLI Tools.  optional arguments:   -h, --help            show this help message and exit   -k KEYWORD, --keyword KEYWORD                         magnet keyword.   -n NUM, --num NUM     magnet number.(default 10)   -s SORT_BY, --sort-by SORT_BY                         0: Sort by date,1: Sort by size. 2. Sort by hot-                         rank.(default 0)   -o OUTPUT, --output OUTPUT                         output file path, supports csv and json format.   -p, --pretty-oneline  show magnets info with one line.   -v, --version         version information. 

2、简单示范

#搜索资源磁力 torrent-cli -k 逃学威龙

Linux VPS使用torrent-cli命令行获取电影等资源的BT磁力

#单行显示并按大小排序(也可以指定排序顺序为2,按热度排序) torrent-cli -k 逃学威龙 -p -s 1

Linux VPS使用torrent-cli命令行获取电影等资源的BT磁力

#保存为csv或者json文件(建议保存为csv文件,json数据会被序列化,转为utf编码) torrent-cli -k 逃学威龙 -o mv.csv 

下载地址: