当前位置: 移动技术网 > IT编程>脚本编程>Python > Python磁力获取器命令行工具 torrent-cli

Python磁力获取器命令行工具 torrent-cli

2019年12月28日  | 移动技术网IT编程  | 我要评论

敦煌种业招聘,银河英雄传说8,南岳指的是

作为一个搞代码的,找资源这种事肯定不能像普通人一样打开百度盲目查找,你需要写个爬虫工具来帮你完成这件事情啦!

兼容环境

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

磁力搜索网站汇总每日更新

 

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网