1
import libtorrent as lt
ses = lt.session()
ses.listen_on(6881, 6891)

TorrentThreads = []
def addTorrentMagnet(MagnetUrl):
    h = ses.add_torrent({'url': MagnetUrl, 'save_path': './', })
    print 'starting', h.name()
    print 'downloading metadata...'
    while (not h.is_seed()):
            s = h.status()
            print s.state
            print s.progress
            time.sleep(1)
    print h.name(), 'complete'
    return ''

libtorrent を使用して torrent をダウンロードしようとしていますが、コードが機能することがあります。

同じトレントが送信で機能するため、トレントやネットワークのせいではありません。

s.status() は常にdownloading_metadataです

libtorrent に代わるものはありますか?

4

1 に答える 1