Is it possible to extract the torrent title from the meta data loaded from DHT or the file downloaded from some server like TPB? any api,lib any language would do
Asked
Active
Viewed 3,993 times
3 Answers
2
Using python
you can easily read/edit a torrent file using bencode.py module
Example:
>>> import bencode >>> rawdata = open('foo.torrent').read() >>> bencode.bdecode(rawdata) {'announce': 'http://cbbatracker.appspot.com/announce', 'comment': 'HOTD for testing purposes', 'created by': 'Transmission/2.04 (11151)', 'creation date': 1292094068, 'encoding': 'UTF-8', 'info': {'length': 262212441, 'name': '[SnF] Highschool of the Dead 02 [285FB2DA].mp4', 'piece length': 131072, 'pieces': '...lot of binary data...', 'private': 0}}

R. Max
- 6,624
- 1
- 27
- 34
0
yes it's possible. Lot of open source torrent softwares use the libtorrent library. It's available in C++ langage

revo
- 540
- 1
- 5
- 15
-
actually not really, torrent title, is website specific, I have not been able to find any fields that says it is the torrent title here – Max Jul 19 '11 at 22:13
0
You have to be more specific what you actually mean. If you meant "info.name" from the metafile, then any bencode module for any language makes that rather easy.

pyroscope
- 4,120
- 1
- 18
- 13