5

I am making a torrent client. I decode the torrent file and send this request to the tracker:

http://tracker.mininova.org/announce?uploaded=0&downloaded=0&compact=0&event=started&peer_id=12345678987654321234&port=6881&info_hash=%18%28n%23K%ECt%B7%93S%C5%F1-%F3%1C%18k%CEX%A4&left=0 

and this is what I received:

{'min interval': 1800, 'peers': '', 'interval': 1800, 'complete': 37, 'incomplete': 0}

Why is the peer list empty? There are 37 peers that are seeders, shouldn't I get some peer information from them?

Braiam
  • 1
  • 11
  • 47
  • 78
help
  • 809
  • 5
  • 18
  • 35
  • I would like to know the answer to this question if you have figured it out. I used this example to implement my UDP , HTTP tracker response https://github.com/erindru/m2t/blob/58c34f97a5ae613e98cf63e562a4de63e936a071/m2t/scraper.py – Saher Ahwal Nov 13 '13 at 19:10
  • 1
    Bit late I guess. Did you try setting compact=1 in your query string. Some trackers only support compact peers list. See https://wiki.theory.org/BitTorrentSpecification#Tracker_Request_Parameters – bytefire Apr 24 '14 at 11:42

2 Answers2

3

The reason that you got an empty peer list is because the tracker don't send seeds to other seeds and there was no leechers registered at the moment of the request.

The tracker registered you as a seed because you sent &left=0in the request string, indicating that you have the complete torrent.

Instead, say the torrent is 200075 bytes and the client has not downloaded anything yet,
it should add &left=200075and the announce will be:

http://tracker.mininova.org/announce?uploaded=0&downloaded=0&compact=0&event=started&peer_id=12345678987654321234&port=6881&info_hash=%18%28n%23K%ECt%B7%93S%C5%F1-%F3%1C%18k%CEX%A4&left=200075

and there will be no answer because the tracker is long dead.

See: https://wiki.theory.org/index.php/BitTorrent_Tracker_Protocol#Basic_Tracker_Announce_Request

Encombe
  • 2,003
  • 1
  • 17
  • 26
0

It's possible the trackers you're querying just aren't storing peers for that torrent. I was able to find peers using DHT.

The URL would be magnet:?xt=urn:btih:18286e234bec74b79353c5f12df31c186bce58a4 .

Matt Joiner
  • 112,946
  • 110
  • 377
  • 526