p2pspiderP2P 爬虫软件
介绍
p2pspider 是一个 DHT 爬虫 + BT 客户端的结合体, 从全球 DHT 网络里"嗅探"人们正在下载的资源, 并把资源的metadata(种子的主要信息)从远程 BT 客户端下载, 并生成资源磁力链接. 通过磁力链接, 你就可以下载到资源文件.
用途
你可以使用 p2pspider 打造私人种子库(比如: 海盗湾), 也可拿它做资源数据挖掘与分析。
安装
git clone https://github.com/Fuck-You-GFW/p2pspider
使用
使用前, 请确保你的 node 版本 >=0.12.0.
'use strict';
var p2pspider = require('../lib/index');
p2pspider(
{
address: '0.0.0.0',
port: 6881,
nodesMaxSize: 200, // be careful
maxConnections: 400, // be careful
timeout: 5000,
filter: function(infohash, callback) {
var theInfohashIsExistsInDatabase = false; // false => always to download the metadata even though the metadata is exists.
callback(theInfohashIsExistsInDatabase);
}
},
function(metadata) {
console.log(metadata);
}
);
评论
