BT Tracker // BEP 0048 - Tracker Protocol Extension: Scrape

BEP 0048 为 Tracker 添加了一个新的协议:scrape (抓取)。

抓取协议允许客户端更新目前 Tracker 上活动的用户数,并以此决定是否应该通过 announce (宣告)协议与 Tracker 联系并更新对等方列表和自己的最新状态。

示例请求

客户端会将原有 Tracker URL 的 announce 替换为 scrape,并向这个接口发送 GET 请求。

GET /scrape?info_hash=xxxxxxxxxxxxxxxxxxxx&info_hash=yyyyyyyyyyyyyyyyyyyy

客户端可以添加多个 info_hash 在查询参数中来同时查询多个 torrent 的信息。

响应

响应体由一个 files 字段组成,files 字段为一个 K-V Dictionary,K 为 torrent 的 info_hash,V 为一个 Dictionary,包含下列字段:

  • complete - 目前做种人数
  • incomplete - 目前正在下载人数
  • downloaded - 曾经下载完成过的人数

示例(使用 JSON 格式以提高可读性)

{
    "files": {
      "xxxxxxxxxxxxxxxxxxxx": {"complete": 11, "downloaded": 13772, "incomplete": 19},
      "yyyyyyyyyyyyyyyyyyyy": {"complete": 21, "downloaded": 206, "incomplete": 20}
    }
  }

查看其他同系列文章

本文采用 知识共享 署名-非商业性使用 4.0 许可。转载时请注明来源,以及原文链接
文章中的示例代码来自 BitSapling/Sapling 项目,授权协议为 GNU General Public License v3.0
暂无评论

发送评论 编辑评论

|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
呼呼
派蒙
巴巴托斯
上一篇
下一篇