All Projects → xieh1995 → bthello

xieh1995 / bthello

Licence: MIT license
Python3 DHT 磁力种子爬虫 种子解析 种子搜索 演示地址

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to bthello

torrent-spider
基于DHT的p2p网络资源爬虫
Stars: ✭ 65 (+51.16%)
Mutual labels:  torrent, bittorrent, dht, magnet
Snail
基于Java、JavaFX开发的下载工具,支持下载协议:BT(BitTorrent、磁力链接、种子文件)、HLS(M3U8)、FTP、HTTP。人家才不要你的⭐⭐呢,哼
Stars: ✭ 102 (+137.21%)
Mutual labels:  torrent, bittorrent, dht, magnet
Bt
BitTorrent library and client with DHT, magnet links, encryption and more
Stars: ✭ 2,011 (+4576.74%)
Mutual labels:  torrent, bittorrent, dht, magnet
peerstohttp
Simple torrent proxy to http stream controlled over REST-like api
Stars: ✭ 30 (-30.23%)
Mutual labels:  torrent, dht, magnet
Magnetw
磁力链接聚合搜索
Stars: ✭ 12,621 (+29251.16%)
Mutual labels:  dht, magnet, bt
Motrix
A full-featured download manager.
Stars: ✭ 29,357 (+68172.09%)
Mutual labels:  bittorrent, magnet, bt
Aria2.js
JavaScript library for aria2, "The next generation download utility."
Stars: ✭ 471 (+995.35%)
Mutual labels:  bittorrent, dht, magnet
Bittorrent Dht
🕸 Simple, robust, BitTorrent DHT implementation
Stars: ✭ 1,004 (+2234.88%)
Mutual labels:  torrent, bittorrent, dht
Antcolony
Nodejs实现的一个磁力链接爬虫 http://findit.keenwon.com (原域名http://findit.so )
Stars: ✭ 1,151 (+2576.74%)
Mutual labels:  torrent, bittorrent, dht
Ssbc
手撕包菜网站
Stars: ✭ 1,382 (+3113.95%)
Mutual labels:  torrent, dht, magnet
Magnet And Torrent Search Engine
磁力链接和 BT 种子的搜索引擎
Stars: ✭ 154 (+258.14%)
Mutual labels:  torrent, dht, magnet
Dht
dht is used by anacrolix/torrent, and is intended for use as a library in other projects both torrent related and otherwise
Stars: ✭ 184 (+327.91%)
Mutual labels:  torrent, bittorrent, dht
nexusphp
A private tracker application base on NexusPHP
Stars: ✭ 209 (+386.05%)
Mutual labels:  torrent, bittorrent, bt
Aria2.sh
Aria2 一键安装管理脚本 增强版
Stars: ✭ 1,276 (+2867.44%)
Mutual labels:  torrent, bittorrent, magnet
Put.io Adder
OS X put.io client that acts as handler for magnet: links and .torrent files, and adds them to your put.io download queue
Stars: ✭ 172 (+300%)
Mutual labels:  torrent, bittorrent, magnet
Torrent Discovery
Discover BitTorrent and WebTorrent peers
Stars: ✭ 177 (+311.63%)
Mutual labels:  torrent, bittorrent, dht
Magnet Uri
Parse a magnet URI and return an object of keys/values
Stars: ✭ 183 (+325.58%)
Mutual labels:  torrent, bittorrent
mad-torrent
Delphi bittorrent protocol implementation
Stars: ✭ 30 (-30.23%)
Mutual labels:  torrent, bittorrent
tinyBT
Implementation of the Bittorrent and Mainline DHT protocol for Distributed Computing applications
Stars: ✭ 30 (-30.23%)
Mutual labels:  bittorrent, dht
Torrent Paradise
Decentralized DHT search site for IPFS
Stars: ✭ 181 (+320.93%)
Mutual labels:  torrent, dht

BTHello Python3 DHT磁力爬虫

简介

这是一个 magnet磁力连接爬虫,通过伪装成一个 DHT 节点,接收其他节点发过来的请求信息,提取相关的 magnet磁力链接。 然后实现BitTorrent BEP-9协议来获取种子文件信息,把文件信息存入redis。

地址

bthello 爬虫程序

bthello-app 入库程序&web搜索

技术栈

使用redis存储种子基本信息 infohash当key 避免了重复

使用elasticsearch为用户提供搜索功能

入库程序说明

入库程序会定时从redis获取数据同步到es infohash作为es id 避免重复 如果id相同 es version+1 version值越大说明种子热度越高

BTHello安装

说明

  • 爬虫程序和入库&web搜索程序是两个工程 可以分开部署 根据自己的需求
  • 比如有a b c 3台服务器分布部署 爬虫 入库 web搜索

运行环境

  • Python3.x
  • redis4.x
  • elasticsearch6.x

爬虫程序部署

git clone https://github.com/xieh1995/bthello.git
cd bthello

#修改redis配置
vi config.py

# redis 地址
REDIS_HOST = "你的redis ip"
# redis 端口
REDIS_PORT = 你的redis ip

#安装依赖包
pip3 install -r requirements.txt
#运行
python3 run.py

#后台运行
nohub python3 run.py &
#日志查看
tail -f nohub.out

运行成功 等待几分钟出现如下输出:

1

就说明已经在爬取了 同时可以看redis[0] 有无数据

image-20190120155238627

入库程序 & web搜索部署

git clone https://github.com/xieh1995/bthello-app.git
cd bthello-app

#修改redis es配置
vi config.py

# redis 地址
REDIS_HOST = "你的redis ip"
# redis 端口
REDIS_PORT = 你的redis ip

#elastics 索引名称
ELASTICS_INDEX_NAME = 'bt_metadata'
#elastics 索引类型
ELASTICS_INDEX_TYPE = 'doc'
# elastics 地址
ELASTICS_HOST = "你的es ip"
# elastics 端口
ELASTICS_PORT = 你的es 端口

#安装依赖包
pip3 install -r requirements.txt

#运行参数说明
-w		#启动web搜索
-m		#启动入库程序
-a		#同时启动web搜索 入库程序
-port	#web搜索端口 默认8000

#根据自己需求启动
python3 main.py -m
python3 main.py -w -port=80
python3 main.py -a -port=80

入库程序运行成功日志

image-20190120154911906

web搜索运行成功页面

image-20190120154911906

web搜索可以访问 ip:port

BTHello常见问题

好久有数据?

1 - 20分钟内 服务器必须可外网访问 爬虫数据在redis[0]

es好久才有数据?

正常情况只要启动了入库程序 2秒执行一次任务 马上就会用 前提是redis[0] 有数据 入库数据在redis[1] 也存了一份

有任何问题可以通过Issues提问

TODO

  • 完成web页面相关
  • 优化多线程
  • 优化入库程序避免重复入库
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].