3
이 코드 시도 :python-libtorrent를 사용하여 토런트의 피어 목록을 얻는 방법?
import libtorrent as lt
import time
ses = lt.session()
ses.listen_on(6881, 6891)
info = lt.torrent_info('test.torrent')
h = ses.add_torrent({'ti': info, 'save_path': './'})
print 'starting', h.name()
while (not h.is_seed()):
s = h.status()
p = h.get_peer_info()
print lt.peer_info().ip
sys.stdout.flush()
time.sleep(15)
print h.name(), 'complete'
를 그리고이 인쇄 :
starting test.avi
('0.0.0.0', 0)
('0.0.0.0', 0)
.
.
.
그래서 대신 나에게 그것은 나를 제공하는 피어 목록을 제공 zeros.Am 내가 뭔가 잘못하고?
감사합니다. 그게 내가 원하는 것입니다. – vkefallinos