python - 从 udp 和 http torrent tracker 响应获取 IP 地址

标签 python scrape bittorrent tracker

我正在尝试获取对等列表:来自 torrent 跟踪器的 IP 地址列表

类似于这里的问题:how to get the peer list from torrent tracker response

我编写了使用 python bencode Bit-torrent library 解码 torrent 文件的代码 我按照这段代码写了代码 here抓取洪流跟踪器。

至少对于像 mininova tracker 这样的 http 请求,我得到了特定 info_hash 的以下输出

{'files': {'\xbf\xff&\xcdY\x05\x9b\xb2C2j\x83\xf5F_\x9bg\x9d\xe2G': {'downloaded': 25416, 'complete': 12, 'incomplete': 0}}}

我没有看到 BitTorrent 记录的任何其他 key here在规范中。 (如 tracker_id、min_interval、peers ...等)

如何获取对等列表?

最佳答案

并非所有的种子都会向您发送抓取请求的对等列表,事实上,我发现几乎没有任何大种子会这样做。您需要向他们发送您开始下载 torrent 的请求(在公告 URL 上),然后您才能获得对等列表。您可以自己查看二进制数据以查看是否存在对等点,或者您可以为我上传示例响应。

关于python - 从 udp 和 http torrent tracker 响应获取 IP 地址,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19962670/

相关文章:

python - Django 错误 ---index() 缺少 1 个必需的位置参数 : 'pk'

python - 将变量传递给正在导入的文件?

重定向后的 PHP Curl

php - PHP DOMDocument错误处理

php - 纯 PHP 洪流客户端?

java - 为什么散列信息字典会出错?

python - opencv python 将掩码区域(黑色或白色像素)复制到 BGR 图像区域

python - 如何提高脚本的效率?

html - 无法在 R 中使用 xpathSapply 选择特定的 html 表

python - 有什么方法可以从 Telegram 机器人打开应用程序?