Tuesday, September 16, 2014

python script to list content of torrent file


!#/usr/bin/python
import libtorrent as lt
import time
import sys

ses = lt.session()
ses.listen_on(6881, 6891)

info = lt.torrent_info(sys.argv[1])

origFile = info.orig_files()
for i in origFile:
    print i.path



Save the file and execute as below

root@localhost$ python list-torrent-file.py theTorrentFile.torrent
James Webb Space Telescope Science Guide (gnv64).pdf

No comments:

Post a Comment