user2983041
user2983041

Reputation: 1861

libtorrent, how download .torrent in Python

I need to use this library from Python, but I not found good documentation.

How can I dowload a torrent using this library, if I have a .torrent file?

Here are and example using magnet link, but I need one with .torrent file.

Thanks.

Upvotes: 0

Views: 2122

Answers (1)

user2983041
user2983041

Reputation: 1861

ses = lt.session() 

ses.listen_on(6881, 6891) 

info = lt.torrent_info('ubuntu.torrent')

h = ses.add_torrent({'ti': info, 'save_path': './'}

Upvotes: 1

Related Questions