做爲一個搞代碼的,找資源這種事確定不能像普通人同樣打開百度盲目查找,你須要寫個爬蟲工具來幫你完成這件事情啦!html
Windows/Linux/MacOspython
$ 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.
根據單關鍵字搜索git
$ torrent-cli 戰狼2
Crawling data for you.....
單行顯示並按大小排序(也能夠指定排序順序爲 2,按熱度排序)github
$ 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 編碼)json
$ torrent-cli 戰狼2 -o movie.csv
開源項目來源:https://gitee.com/zerolemon/torrent_tool