作为一个搞代码的,找资源这种事肯定不能像普通人一样打开百度盲目查找,你需要写个爬虫工具来帮你完成这件事情啦!
兼容环境
Windows/Linux/MacOs
安装
pip 安装
$ pip install torrent-cli
源码安装
$ git clone https://github.com/chenjiandongx/torrent-cli.git
$ cd torrent-cli
$ pip install -r requirements.txt
$ python setup.py install
如何使用
$ torrent-cli
usage: torrent-cli [-h] [-n NUM] [-s SORT_BY] [-o OUTPUT] [-p] [-v]
[KEYWORD [KEYWORD ...]]
Magnets-Getter CLI Tools.
positional arguments:
KEYWORD magnet keyword.
optional arguments:
-h, --help show this help message and exit
-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.
示例
根据单关键字搜索
$ torrent-cli 战狼2
Crawling data for you.....
单行显示并按大小排序(也可以指定排序顺序为 2,按热度排序)
$ torrent-cli 战狼2 -p -s 1
Crawling data for you.....
magnet:?xt=urn:btih:CC3854CACBB5434E03EFF39C693B20223E0AA39D 56.8 GB 2018-05-14
magnet:?xt=urn:btih:D6A5598C03C3123038DB6CAA04AE36D90BB569C6 35.0 GB 2018-02-22
magnet:?xt=urn:btih:5B411E880CB585B5B596DBB25BB7F0927FD44F54 13.2 GB 2018-01-01
magnet:?xt=urn:btih:B8E5C85B5B368060AB245AC5E434981B0D5543CA 12.4 GB 2018-02-23
magnet:?xt=urn:btih:4640565A71BB840D6A082B7F8D387A5FF604941A 9.2 GB 2017-12-12
magnet:?xt=urn:btih:B6401277BA77620727F7D6FE1345501555F7CA28 7.8 GB 2017-11-16
magnet:?xt=urn:btih:2154B29E07DF4D21B67488C55667B1AB22CD63F4 7.8 GB 2017-12-17
magnet:?xt=urn:btih:C1F01F089892ECF2AF168C190754B2921902D9E1 7.5 GB 2017-11-16
magnet:?xt=urn:btih:DE42BC281CF39F0F489B64F06C2440466D545C83 5.4 GB 2017-12-13
或者可以保存为 csv 或者 json 文件(建议保存为 csv 文件,json 数据会被序列化,转为 utf 编码)
$ torrent-cli 战狼2 -o movie.csv开源项目来源:https://gitee.com/zerolemon/torrent_tool
磁力搜索网站汇总每日更新
https://www.cnblogs.com/cilisousuo/p/12099547.html
来源:https://www.cnblogs.com/cilisousuo/p/12110863.html