-3

I want get values from url-list from tracker-less torrent with just web seeds.

I writed this

     TorrentFile torrent = Bencode.DecodeTorrentFile("tr.torrent");
     BList urllist = (Blist)torrent["url-list"];

but this don't work because urllist is null. How to get url-list ?

1 Answers1

0

Have you used the debugger to investigate what's in the torrent variable after you do the following? There's probably tons on data in there if you set a breakpoint on your second line... The debugger is your friend.

TorrentFile torrent = Bencode.DecodeTorrentFile("tr.torrent");

Also, do you mean the trackers?
Look here: https://github.com/Krusen/BencodeNET

you might just want what's in

BList announceList = torrent["announce-list"];
KSib
  • 893
  • 1
  • 7
  • 24
  • I can get announce-list I want url-list. Here is screeen torrent structure http://i.imgur.com/Z4cPFhj.png url-list it list of web seeds https://en.wikipedia.org/wiki/BitTorrent#Web_seeding – Marcin Kurzawski Sep 01 '16 at 16:04
  • So when you debug the torrent object, what's in there? – KSib Sep 01 '16 at 16:05
  • You keep posting that image. Is there a reason you aren't investigating the object in Visual Studio? – KSib Sep 01 '16 at 16:09
  • I writed this to read information from torrent TorrentFile torrent = Bencode.DecodeTorrentFile("tr.torrent"); BString announce = (BString)torrent["announce"]; object dat = (object)torrent["creation date"]; object createdby = (object)torrent["created by"]; object comment = (object)torrent["comment"]; BDictionary ndata = torrent.Info; BString name = (BString)ndata["name"]; and this works to me but when I added BList urllist = (Blist)torrent["url-list"]; urllisit was null in debugger – Marcin Kurzawski Sep 01 '16 at 16:17
  • 1
    You're kind of dodging around my question... Also, can you just post the torrent? It would make this hopefully a bit easier... – KSib Sep 01 '16 at 16:18